九九乘法表
for i in range(1,10):
for j in range (1,i+1):
print(‘%s*%s=%s’ %(i,j,i*j)
print()
打印金字塔
max_current = 4
for current in range(1, max_current + 1):
for i in range(max_current - current):
print(' ', end='')
for j in range(2 * current - 1):
print('*', end='')
print()