摘要:
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) n=10 for 阅读全文
摘要:
def is_valid(y): if len(y)==18: y1=y[:17] if y1.isdigit(): for j in y: y2=[] y2.append(j) m=['1','2','3','4','5','6','7','8','9','X'] if y[-1] in m: r 阅读全文
摘要:
#tesk3.py with open('data3.txt','r+', encoding='UTF-8') as f: Z=[] Y=[] x=[] for i in f: x.append(i.strip('\n')) newx=x[1:11] for i in newx: y=float(i 阅读全文
摘要:
task1 import randomprint('用列表存储随机整数: ')ls = [random.randint(1, 100) for i in range(5)]print(ls)print('\n用集合存储随机整数: ')s1 = {random.randint(1,100) for i 阅读全文
摘要:
task1.py 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 = '-' 阅读全文