摘要: from turtle import * # 绘制正方形 # 参数size指定边长,rgb指定画笔颜色 # 如果没有给参数,采用默认值 def square(size=50, rgb = 'blue'): pencolor(rgb) for i in range(4): fd(size) left( 阅读全文
posted @ 2021-06-17 23:35 闻九弦 阅读(12) 评论(0) 推荐(0)
摘要: class studentDoc: def __init__(self,stu_num,name,major,score): self.stu_num=stu_num self.name=name self.major=major self.score=score def info(self): p 阅读全文
posted @ 2021-05-31 19:13 闻九弦 阅读(12) 评论(0) 推荐(0)
摘要: 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: x[2],r 阅读全文
posted @ 2021-05-18 15:01 闻九弦 阅读(43) 评论(0) 推荐(0)
摘要: task1 x1,y1=1.2,3.58 x2,y2=2.26,8.7 #shu chu 1 print('{:-^40}'.format('shu chu 1')) print('x1={},y1={}'.format(x1,y1)) print('x2={},y2={}'.format(x2,y 阅读全文
posted @ 2021-04-09 15:29 闻九弦 阅读(34) 评论(0) 推荐(0)
摘要: 试验任务1 x=1 y=2 z=4 print(x,y,z) print('x={},y={},z={}'.format(x,y,z)) print(x) print(y) print(z) print(x,end='') print(y,end='') print(z,end='') 试验任务二 阅读全文
posted @ 2021-04-01 21:24 闻九弦 阅读(54) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示