for x in range(1,4): for o in range(0,x-1): print('*',end='') pass pass print('*') print('\n')print("正方形")for c in range(1,4): for b in range(2): print('*',end='*') pass print('*') pass print("乘法表") for m in range(1,10): for n in range…
一.for循环打印九九乘法表 #注意:由于缩进在浏览器不好控制,请大家见谅,后续会有图片传入. 1.1 左下角 for i in range(1,10): for j in range(1,i+1): print('%d*%d=%2d\t'%(j,i,i*j),end='') print() 效果图: 1.2 右下角 for i in range(1,10): for k in range(i+1,10): print(end=' ') #此处为返回八个空格,请注…