摘要:
x = [] f = open('C:\\Users\\J&K\\Desktop\\实验4文档相关代码和数据文件\\实验4文档相关代码和数据文件\\data6_1.txt', encoding='utf_8') y = f.readlines() for i in y: x.append(i.str 阅读全文
摘要:
import random day = random.randint(1, 31) count = 0 print('猜猜2021年5月哪一天是你的lucky day:)') x = int(input(print('你有三次机会, 猜吧(1~31):'))) if count < 3: if x 阅读全文
摘要:
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='-') print('\n 阅读全文
摘要:
lists = [] i = 0 n = 1 while i <= 2: x = input('输入愿望') lists.append(x) i += 1 lists.sort() print('{:-^40}'.format('我的愿望清单')) for list in lists: print( 阅读全文
摘要:
lists = '''The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is 阅读全文