摘要: 实验任务3 from turtle import * def square(size=50, rgb = 'blue'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800, 600) speed(0) 阅读全文
posted @ 2021-06-14 21:00 cc121212 阅读(52) 评论(2) 推荐(0) 编辑
摘要: 实验任务1 class Account: def __init__(self,name,account_number,initial_amount): self._name = name self._card_no = account_number self._balance = initial_a 阅读全文
posted @ 2021-05-29 19:56 cc121212 阅读(65) 评论(3) 推荐(0) 编辑
摘要: 实验任务6 with open('data6_1.txt','r',encoding = 'utf-8') as f: c = f.read().split('\n') cc = [str(n).split('\t') for n in c] cc.sort(key = lambda x: x[2] 阅读全文
posted @ 2021-05-16 21:21 cc121212 阅读(55) 评论(2) 推荐(0) 编辑
摘要: 实验任务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}',end = '-' 阅读全文
posted @ 2021-04-22 22:42 cc121212 阅读(59) 评论(2) 推荐(0) 编辑
摘要: 实验任务1 print('hey , u') print('hey','u') x=1 y=2 z=3 print(x,y,z) print('x = %d , y = %d, z = %d' %(x,y,z)) print('x = {},y = {},z= {}'.format(x,y,z)) 阅读全文
posted @ 2021-04-02 17:30 cc121212 阅读(34) 评论(1) 推荐(0) 编辑
摘要: 实验任务1x1,y1 = 1.2,3.57 x2,y2 = 2.26,8.7 print('{:-^40}'.format('输出1')) print('x1 = {}, y1 = {}'.format(x1,y1)) print('x2 = {}, y2 = {}'.format(x2,y2)) 阅读全文
posted @ 2021-04-02 16:27 cc121212 阅读(106) 评论(2) 推荐(0) 编辑