标签:输出,9x9,range,遍历,print,乘法表 From: https://www.cnblogs.com/cenb/p/16952108.html
#变量i遍历从1到9的序列
for i in range(1,10):
#变量j遍历从1到i+1的序列,以保证j的最大值不超过i
for j in range(1,i+1):
# 输出j x i=j*i,制表符
print(f"{j}x{i}={i*j}",end="\t")
#输出空,换行
print()
标签:输出,9x9,range,遍历,print,乘法表 From: https://www.cnblogs.com/cenb/p/16952108.html
#变量i遍历从1到9的序列
for i in range(1,10):
#变量j遍历从1到i+1的序列,以保证j的最大值不超过i
for j in range(1,i+1):
# 输出j x i=j*i,制表符
print(f"{j}x{i}={i*j}",end="\t")
#输出空,换行
print()