本文共 520 字,大约阅读时间需要 1 分钟。
n = t = m = int(input('>>')) #定义变量
i = 1while n >= 10: # 计算数字位数n = n / 10i += 1while i > 0: #分别打印位数
i -= 1print(t // (10 i))t = t % (10 i)for i in range(1,10):
print('')for j in range(1,i+1):sum = j iprint(j,'',i,'=',sum,end='\t')corse = int(input('>>'))
if corse >= 80:if corse > 90:print('A')else:print('B')else:if corse >= 70:print('C')elif corse >= 60:print('D')else:print('E')转载于:https://blog.51cto.com/13445354/2369456