摘要:
#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 阅读全文
摘要:
#student.pyclass Gakusetati: def __init__(self,num:int,name:str,senngilyou:str,tennsuu:int): self.num = num self.name = name self.senngilyou = senngil 阅读全文
摘要:
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 阅读全文
摘要:
#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 = "- 阅读全文
摘要:
#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) 阅读全文
摘要:
print( )用法: 1.用于输出单个字符串或单个变量 2.用于输出多个数据项,用逗号分隔 3.用户混合字符串和变量值 其它:默认分行与不分行 eval( )用法及示例: 1、字符串转换成列表 >>>a = "[[1,2], [3,4], [5,6], [7,8], [9,0]]" >>>type 阅读全文