摘要:
from turtle import * from random import random def square(size=50, rgb = tuple(random() for i in range(3))): pencolor(rgb) for i in range(4): fd(size) 阅读全文
摘要:
import student u1 = student.self('111','jake','生态','92') u1.change_point(100) u1.info() u2 = student.self('222','det','生态','95') u2.info() class Stude 阅读全文
摘要:
with open('data7.txt','r') as f: x=[] m=f.readlines() y=int(input('输入随机抽点人数:')) import random i=0 while i<y: n=random.randint(1,80) a=m[n] print(a.str 阅读全文
摘要:
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整数输出3',en 阅读全文
摘要:
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整数输出3',en 阅读全文
摘要:
def fun(n): if n <=1: return n else:return fun(n-1)+fun(n-2) for n in range(17): print(fun(n)) m=1 for n in [fun(n)]: print(f'{n:4d}',end=' 'if m%5 el 阅读全文
摘要:
import random x=random.randint(1,31) y=eval(input('猜猜2021年5月哪一天会是你的幸运日/n你有三次机会,猜吧')) if x==y: print('lucky day') else: i=0 while i<2: if y==x: print(' 阅读全文