摘要:
task_5 class User: def __init__(self,name,password,status): if name=="" and password=="": self.name="guest" self.password="111111" self.status="1" els 阅读全文
摘要:
task_3 def is_valid(a): b = 0; c = 0 for i in a: b += 1 if '0' <= i <= '9' or i == 'X': pass else: c += 1 break if b != 18 or c != 0: return False if 阅读全文
摘要:
task_3 with open('data3.txt','r+',encoding='utf-8')as f: a=[] for i in f: i=i.strip('\n') a.append(i) a.pop(0) b=[eval(i) for i in a] print(f'原始数据:\n{ 阅读全文
摘要:
task1 import random print('用列表存储随机整数: ') ls = [random.randint(1, 100) for i in range(5)] print(ls) print('\n用集合存储随机整数: ') s1 = {random.randint(1,100) 阅读全文
摘要:
task_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 = ' 阅读全文