SAKURA-QiQi

导航

2022年6月13日 #

实验8

摘要: from turtle import * def square(size=50, rgb='gold'): '''绘制正方形 参数size指定边长 参数rgb指定画笔颜色 如果没有给参数,采用默认值 ''' pencolor(rgb) for i in range(4): fd(size) left 阅读全文

posted @ 2022-06-13 23:56 QiQi-sakura 阅读(18) 评论(2) 推荐(0) 编辑

2022年6月6日 #

实验7

摘要: Admin_User class User: """用户""" count = 0 def __init__(self, name='guest', password=111111, status=1): User.count += 1 self.name = name self.password 阅读全文

posted @ 2022-06-06 23:08 QiQi-sakura 阅读(17) 评论(1) 推荐(0) 编辑

2022年5月25日 #

实验6

摘要: task3 # Created on 刘杰的iPad. f1=open('data3_id.txt','r') list1,list3=[],[] for i in f1.readlines(): list1.append(i.strip().split(',')) def is_valid(x): 阅读全文

posted @ 2022-05-25 07:00 QiQi-sakura 阅读(15) 评论(2) 推荐(0) 编辑

2022年5月16日 #

实验五

摘要: task3 # Created on 刘杰的iPad. with open('data3.txt', 'r+', encoding = 'utf-8')as f: data = f.readlines() f.seek(0) f.truncate() data1 = [] for i in rang 阅读全文

posted @ 2022-05-16 19:25 QiQi-sakura 阅读(17) 评论(1) 推荐(0) 编辑

2022年5月9日 #

实验四

摘要: task1 Created on Mon May 9 19:12:43 2022 @author: ASUS """ print(sum) sum = 42 print(sum) def inc(n): sum = n+1 print(sum) return sum sum = inc(7) + i 阅读全文

posted @ 2022-05-09 19:51 QiQi-sakura 阅读(26) 评论(2) 推荐(0) 编辑

2022年4月24日 #

实验三

摘要: 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-24 10:43 QiQi-sakura 阅读(26) 评论(2) 推荐(0) 编辑

2022年4月12日 #

实验2

摘要: 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:0>2d}',end='-') print('\n整数输出3:', 阅读全文

posted @ 2022-04-12 13:29 QiQi-sakura 阅读(14) 评论(2) 推荐(0) 编辑

2022年3月29日 #

实验1 Python开发环境使用和编程初体验作业

摘要: #用于输出单个字符串或变量 print('hey,u') #用于输出多个数据项,逗号分隔 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={} 阅读全文

posted @ 2022-03-29 20:35 QiQi-sakura 阅读(52) 评论(3) 推荐(0) 编辑