Python用for循环打印反向九九乘法表
发布网友
发布时间:2022-04-06 00:07
我来回答
共2个回答
热心网友
时间:2022-04-06 01:36
for i in range(1,10):
for k in range(1,10-i):
print(end=" ")
for j in range(1,i+1):
proct=i*j
print("%d*%d=%2d" % (i,j,proct),end=" ")
print (" ")
运行结果:
追问这个我也能打出来,图片这个想了好久还是没想出来.
热心网友
时间:2022-04-06 02:54
for num1 in range(1,10):
for num2 in range(1,10):
if num1 >= num2:
pass
print(num2,"*",num1,"=",num1*num2,end="\t")
print()