摘要: #task3 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( 阅读全文
posted @ 2021-06-11 23:03 pi_eggs 阅读(54) 评论(0) 推荐(0)
摘要: class StudentDoc: ''' 学生档案 数据:学号、姓名、专业、python课程分数 操作:打印学生信息、返回课程分数、修改课程分数 ''' def __init__(self, stu_number, name, professional, score): self._stu_num 阅读全文
posted @ 2021-05-29 10:16 pi_eggs 阅读(79) 评论(0) 推荐(0)
摘要: #tsak6 a=[]with open('data6_1.txt','r',encoding='utf-8') as f: lines=f.readlines() for line in lines: a.append(line.strip().split())n = lambda x:x[2]a 阅读全文
posted @ 2021-05-12 17:12 pi_eggs 阅读(62) 评论(0) 推荐(0)
摘要: #task1_1 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='-') print('\ 阅读全文
posted @ 2021-04-27 11:44 pi_eggs 阅读(63) 评论(0) 推荐(0)
摘要: #task1 #使用字符串的format()方法,对输出数据进行格式化x1, y1 = 1.2, 3.57x2, y2 = 2.26, 8.7#输出1print('{:-^40}'.format('输出1'))print('x1 = {} , y1 = {}'.format(x1, y1))prin 阅读全文
posted @ 2021-04-05 21:57 pi_eggs 阅读(103) 评论(0) 推荐(0)
摘要: #task1print('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, 阅读全文
posted @ 2021-04-02 21:45 pi_eggs 阅读(36) 评论(0) 推荐(0)