摘要: 3.from turtle import * def square(size = 50,rgb = 'orange'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) fo 阅读全文
posted @ 2021-06-14 21:45 谢尔比 阅读(49) 评论(1) 推荐(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-25 18:19 谢尔比 阅读(41) 评论(0) 推荐(0)
摘要: 1. 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-13 18:06 谢尔比 阅读(52) 评论(0) 推荐(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-18 11:35 谢尔比 阅读(59) 评论(0) 推荐(0)
摘要: 1. x1, 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, y 阅读全文
posted @ 2021-04-03 14:56 谢尔比 阅读(68) 评论(1) 推荐(0)
摘要: 阅读全文
posted @ 2021-04-01 18:13 谢尔比 阅读(29) 评论(1) 推荐(0)
点击右上角即可分享
微信分享提示