摘要:
from turtle import* setup(800,600) speed(0) pencolor('pink') n=10 for i in range(n): for j in range(2): circle(80,90) left(90) right(360/n) hideturtle 阅读全文
摘要:
class User: def __init__(self,name='guest',password=111111,status=1): self.name=name self.password=password self.status=status def info(self): print(' 阅读全文
摘要:
with open("data5.txt","r",encoding="utf-8") as f: d=f.readlines() import random n=int(input("输入随机抽点人数:")) f1=set() l=len(f1) while l<n: f=random.randi 阅读全文
摘要:
task3 with open('C:\\Users\\Administrator\\Desktop\\实验5\\实验5数据文件\\data3.txt','r',encoding='utf-8') as f: data=f.read().split('\n') list1=[] list2=[] f 阅读全文
摘要:
import random print('用列表存储随机整数: ') ls = [random.randint(1, 100) for i in range(5)] print(ls) print('\n用集合存储随机整数: ') s1 = {random.randint(1,100) for i 阅读全文
摘要:
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('hey','u') x,y,z=1,2,3 print(x,y,z) print('x=%d,y=%d,z=%d'%(x,y,z)) print('x={},y={},z={}.format(x,y,z)') print(f'x={x},y={y},z={z}') print(x) p 阅读全文