摘要: task3.py from turtle import* def square(size=50,rgb='pink'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) fo 阅读全文
posted @ 2021-06-11 17:20 是花花吖 阅读(39) 评论(2) 推荐(0) 编辑
摘要: class StudentDoc: def __init__(self,studentnumber,name,major,point): self._studentnumber = studentnumber self._name = name self._major = major self._p 阅读全文
posted @ 2021-05-25 16:57 是花花吖 阅读(23) 评论(2) 推荐(0) 编辑
摘要: task6 with open("data6_1.txt","r",encoding="utf-8") as f: data=f.read().split("\n") data1=[str(m).split("\t") for m in data] data1.sort(key=lambda x: 阅读全文
posted @ 2021-05-18 08:42 是花花吖 阅读(25) 评论(1) 推荐(0) 编辑
摘要: task1_1.py x=list(range(10)) print('整数输出1:',end='') for i in x: print(i,end='') print('\n整数输出2:',end='') for i in x: print(f'{i:02d}', end = '-') prin 阅读全文
posted @ 2021-04-20 10:04 是花花吖 阅读(41) 评论(1) 推荐(0) 编辑
摘要: x1,y1=1.2,3.57 x2,y2=2.26,8.7 print('{:-^40}'.format('输出1')) print('x1={},y1={}'.format(x1,y1)) print('x2={},y2={}'.format(x2,y2)) print('{:-^40}'.for 阅读全文
posted @ 2021-04-08 14:41 是花花吖 阅读(35) 评论(1) 推荐(0) 编辑
摘要: print('hey, u') print('hey', ' u') x = 1 y = 2 z = 3 print(x, y, z) a,b = eval(input('Enter two numbers: ')) print(f'a={a}, b={b}') a,b = b,a print(f' 阅读全文
posted @ 2021-03-30 10:05 是花花吖 阅读(43) 评论(1) 推荐(0) 编辑