许文德

导航

2021年6月17日 #

实验6

摘要: task1 # 以(0,0)为圆心,绘制9个同心圆 from turtle import * # 把画笔移至坐标(x,y) def moveto(x,y): penup() goto(x,y) pendown() def main(): setup(800, 600) speed(0) # 以(0, 阅读全文

posted @ 2021-06-17 22:08 许文德 阅读(41) 评论(1) 推荐(0) 编辑

2021年5月31日 #

实验五

摘要: task1.1with open('data1_1.txt', 'r', encoding = 'utf-8') as f: data = f.readlines() n = 0 for line in data: if line.strip('\n') == '': continue n += 1 阅读全文

posted @ 2021-05-31 21:20 许文德 阅读(24) 评论(0) 推荐(0) 编辑

2021年5月16日 #

实验4

摘要: with open('data1_1.txt', 'r', encoding = 'utf-8') as f: data = f.readlines() n = 0 for line in data: if line.strip('\n') == '': continue n += 1 print( 阅读全文

posted @ 2021-05-16 12:47 许文德 阅读(54) 评论(1) 推荐(0) 编辑

2021年4月22日 #

实验3

摘要: 任务1 #格式控制,列表解析,类型转换 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} 阅读全文

posted @ 2021-04-22 22:16 许文德 阅读(51) 评论(0) 推荐(0) 编辑

2021年4月5日 #

实验2

摘要: 任务1x1,y1 = 1.2,3.57x2,y2 = 2.26,8.7print('{:-^40}'.format('输出1'))print('x1 = {},y1 = {}'.format(x1,y1))print('x2 = {},y2 = {}'.format(x2,y2))print('{: 阅读全文

posted @ 2021-04-05 14:12 许文德 阅读(60) 评论(3) 推荐(0) 编辑