#打印九九乘法表
for a in range(1,10): for b in range(1,a+1): res='{}*{}={}'.format(a,b,a*b) print(res,end=' ') 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=' ') count+=2