摘要: def square(size=50, rgb = 'orange'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800, 600) speed(0) for i in range(10): squar 阅读全文
posted @ 2021-06-16 18:19 陆恩泽 阅读(55) 评论(1) 推荐(0)
摘要: class StudentDoc: def __init__ (self,number,name,major,score): self.number=number self.name=name self.major=major self.score=score def info(self): pri 阅读全文
posted @ 2021-06-11 15:56 陆恩泽 阅读(43) 评论(2) 推荐(0)
摘要: with open('D:\\data6_1.txt','r',encoding='utf-8') as f: t=[] for line in f.readlines(): m=line.strip().split() t.append(m) t.sort(key=lambda l:l[2],re 阅读全文
posted @ 2021-05-13 23:17 陆恩泽 阅读(59) 评论(0) 推荐(0)
摘要: 思考 思考一:包括100,不包括100 思考二:不一定,集合中输入的元素可能会重复 task2 x=[0,1]a=0b=1c=a+bj=0while c<1000: x.append(c) a=b b=c c=a+bfor i in x: print('{:>3d}'.format(i),end=' 阅读全文
posted @ 2021-04-28 18:41 陆恩泽 阅读(54) 评论(0) 推荐(0)
摘要: task1 print("hey,u")print("hey","u")x=1y=2z=3print(x,y,z)print("x=%d,y=%d,z=%d"%(x,y,z))print("x={},y={},z={}".format(x,y,z))print(f"x={x},y={y},z={z} 阅读全文
posted @ 2021-04-02 18:52 陆恩泽 阅读(40) 评论(0) 推荐(0)
摘要: task1 x1,y1=1.2, 3.57 x2,y2 = 2.26, 8.7 #输出1 print("{:-^40}".format("输出1")) print("x1={},y1={}".format(x1,y1)) print("x2={},y2={}".format(x2,y2)) #输出2 阅读全文
posted @ 2021-04-02 17:29 陆恩泽 阅读(91) 评论(0) 推荐(0)