Python学习心得第二周-作业
#打印九九乘法表
for a in range(1,10): for b in range(1,a+1): res='{}*{}={}'.format(a,b,a*b) print(res,end='\t') print()
#打印金字塔
#for
for a in range(1,10,2): m = a * '*' print(m.center(10))
#while
a='*' count=1 while count < 10: print((a*count).center(10) ,end='\n') count+=2