摘要: 3 实验任务3:使用turtle库用矩形绘制花瓣 task3.py from turtle import*def square(size=50, rgb='orange'): pencolor(rgb) for i in range(4): fd(size) left(90)def main(): 阅读全文
posted @ 2021-06-17 20:02 sdyy 阅读(166) 评论(1) 推荐(0)
摘要: 实验任务5:自定义模块及模块导入编程 一:把类StudentDoc保存到模块student.py中 '''student.py''' class StudentDoc: '''学生档案管理''' def __init__(self,students_number,studens_name,major 阅读全文
posted @ 2021-06-01 12:43 sdyy 阅读(65) 评论(3) 推荐(0)
摘要: 实验任务6:综合应用(1) —— 分数文件处理 with open('data6_1.txt','r',encoding='utf-8') as f: ls=sorted([line.replace('\n','').split('\t') for line in f.readlines()],ke 阅读全文
posted @ 2021-05-18 12:49 sdyy 阅读(66) 评论(3) 推荐(0)
摘要: task1_1. x=list(range(10)) print(f"整数输出1:",end="") for i in x: print(i,end=" ") print("\n整数输出2:",end="") for i in x: print(f"{i:02d}",end="-") print(" 阅读全文
posted @ 2021-04-22 22:41 sdyy 阅读(114) 评论(2) 推荐(0)