题目:如何打印出阶梯状的99乘法表?
题解:
#coding:utf-8
def multiplication_tables(num):
#for i in range(1,10):
for j in range(1,i+1):
print("%d*%d=%d"%(j,i,i*j),end=" ")
print(" ")
for i in range(1,10):
multiplication_tables(i)
题目:如何打印出阶梯状的99乘法表?
题解:
#coding:utf-8
def multiplication_tables(num):
#for i in range(1,10):
for j in range(1,i+1):
print("%d*%d=%d"%(j,i,i*j),end=" ")
print(" ")
for i in range(1,10):
multiplication_tables(i)