摘要: #task3.py from turtle import * def square(size=50, rgb = 'yellow'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800, 600) spe 阅读全文
posted @ 2021-06-15 22:44 做作的狗屎 阅读(28) 评论(1) 推荐(0) 编辑
摘要: #student.pyclass Gakusetati: def __init__(self,num:int,name:str,senngilyou:str,tennsuu:int): self.num = num self.name = name self.senngilyou = senngil 阅读全文
posted @ 2021-05-25 23:41 做作的狗屎 阅读(42) 评论(4) 推荐(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-11 22:59 做作的狗屎 阅读(73) 评论(4) 推荐(0) 编辑
摘要: #task1_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-18 11:32 做作的狗屎 阅读(61) 评论(0) 推荐(0) 编辑
摘要: #task1.pyx1,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) 阅读全文
posted @ 2021-04-02 23:18 做作的狗屎 阅读(62) 评论(0) 推荐(0) 编辑
摘要: print( )用法: 1.用于输出单个字符串或单个变量 2.用于输出多个数据项,用逗号分隔 3.用户混合字符串和变量值 其它:默认分行与不分行 eval( )用法及示例: 1、字符串转换成列表 >>>a = "[[1,2], [3,4], [5,6], [7,8], [9,0]]" >>>type 阅读全文
posted @ 2021-04-02 00:26 做作的狗屎 阅读(59) 评论(0) 推荐(0) 编辑