2022年6月13日

实验8

摘要: from turtle import * def square(size=50, rgb='gold'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800, 600) speed(0) n = 10 f 阅读全文

posted @ 2022-06-13 11:17 其米卓嘎 阅读(9) 评论(1) 推荐(0) 编辑

2022年6月9日

实验7

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

posted @ 2022-06-09 11:43 其米卓嘎 阅读(8) 评论(2) 推荐(0) 编辑

2022年5月16日

实验五:

摘要: with open('data1_2.txt', 'r', encoding = 'utf-8') as f: n = 0 for line in f: if line.isspace(): continue n += 1 print(f'共{n}行') with open('data2.txt', 阅读全文

posted @ 2022-05-16 21:53 其米卓嘎 阅读(18) 评论(2) 推荐(0) 编辑

2022年5月10日

实验四

摘要: print(sum) sum = 42 print(sum) def inc(n): sum = n+1 print(sum) return sum sum = inc(7) + inc(7) print(sum) list1=[1,9,8,4] print(sorted(list1)) print 阅读全文

posted @ 2022-05-10 20:50 其米卓嘎 阅读(8) 评论(3) 推荐(0) 编辑

2022年4月26日

实验3:控制语句与组合数据类型应用编程

摘要: import random print('用列表存储随机整数: ') ls = [random.randint(1, 100) for i in range(5) print(ls) print('\n用集合存储随机整数: ') s1 = {random.randint(1,100) for i i 阅读全文

posted @ 2022-04-26 12:18 其米卓嘎 阅读(27) 评论(3) 推荐(0) 编辑

2022年4月13日

实验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:02d}', end = '-') pri 阅读全文

posted @ 2022-04-13 13:09 其米卓嘎 阅读(31) 评论(3) 推荐(0) 编辑

2022年3月27日

实验一:

摘要: task1_1.pyprint('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 = {}, z = {}'.form 阅读全文

posted @ 2022-03-27 22:06 其米卓嘎 阅读(14) 评论(3) 推荐(0) 编辑

导航