摘要: from turtle import * 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 阅读全文
posted @ 2021-06-17 23:23 耷拉吧啦的猹 阅读(30) 评论(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-01 10:30 耷拉吧啦的猹 阅读(39) 评论(0) 推荐(0)
摘要: with open('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],revers 阅读全文
posted @ 2021-05-17 21:35 耷拉吧啦的猹 阅读(31) 评论(0) 推荐(0)
摘要: test.11-1.pyx = 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='-') 阅读全文
posted @ 2021-04-16 17:08 耷拉吧啦的猹 阅读(34) 评论(1) 推荐(0)
摘要: text.1 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)) pri 阅读全文
posted @ 2021-04-08 23:07 耷拉吧啦的猹 阅读(47) 评论(1) 推荐(0)
摘要: text.1 print('hey,u') print('hey','u') x=1 y=2 z=3 print(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 阅读全文
posted @ 2021-04-02 23:32 耷拉吧啦的猹 阅读(28) 评论(0) 推荐(0)