摘要:
from turtle import* def moveto(x,y): penup() goto(x,y) pendown() def main(): setup(800,600) speed(0) for radius in range(20,200,20): moveto(0,-radius) 阅读全文
摘要:
class Account: '''一个模拟银行账户的简单类''' def __init__(self, name, account_number, initial_amount): self._name = name self._card_no = account_number self._bal 阅读全文
摘要:
with open('data1_1.txt', 'r', encoding = 'utf-8') as f: n = 0 for line in f: if line.strip('\n') == '': continue n += 1 print(f'共{n}行') with open('dat 阅读全文
摘要:
x = list(range(10)) print('整数输出:' ,end='') for i in x: print(i,end=' ') print('\n整数输出2:',end='') for i in x: print(f'{i:02d}',end='-') print('\n整数输出3: 阅读全文