摘要: 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 阅读全文
posted @ 2022-06-13 00:04 杪秋有四0904 阅读(9) 评论(0) 推荐(0) 编辑
摘要: class User: def __init__(self,name='guest',password=111111,status=1): self.name=name self.password=password self.status=status def info(self): print(' 阅读全文
posted @ 2022-06-08 09:46 杪秋有四0904 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-05-25 02:01 杪秋有四0904 阅读(6) 评论(3) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-05-17 12:28 杪秋有四0904 阅读(9) 评论(1) 推荐(0) 编辑
摘要: import random print('用列表存储随机整数: ') ls = [random.randint(1, 100) for i in range(5)] print(ls) print('\n用集合存储随机整数: ') s1 = {random.randint(1,100) for i 阅读全文
posted @ 2022-04-27 12:30 杪秋有四0904 阅读(9) 评论(3) 推荐(0) 编辑
摘要: 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 = '-') # 指 阅读全文
posted @ 2022-04-13 10:54 杪秋有四0904 阅读(8) 评论(2) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-03-28 11:31 杪秋有四0904 阅读(11) 评论(4) 推荐(0) 编辑