06 2016 档案
摘要:for i in range(1,10): for j in range(1,i+1): print('%d x %d = %d\t' %(j, i, j*i),end="") print('\n')
阅读全文
摘要:while 1: s = input('请输入一个数:') s = int(s) if s == 2: print('质数') else: if s == 0 or s == 1: print('都不是') else: u = s - 2 h = 1 ...
阅读全文
摘要:while 1: s = input('请填入一个年份:') s = int(s) year = False if s % 100 == 0 and s % 400 == 0: year = True elif s % 100 != 0 and s % 4 == 0: year = True if...
阅读全文
摘要:a = 50 y = '*'*(a+1) p = ' ' while a: print(y) y = y[:a-1] y = p + y a = a - 1 for i in range(20): print(' ' * (20-i-1) + '*' * (2*i+1) ) a = 20 p = ' '*(a+1...
阅读全文

浙公网安备 33010602011771号