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(1,m+1):
print(‘%s×%s=%s‘%(n,m,m*n),end=‘ ‘)#指定字符宽度
print()
原文地址:https://www.cnblogs.com/tallme/p/9490863.html
时间: 2024-11-05 23:22:53