# 九九乘法表
row = 1
while row <= 9:
col = 1
while col <= row:
print(str(col) + "*" + str(row) + "=" + str(col * row), end="\t") # "\t"是制表符
col += 1
print()
row += 1
运行结果
# 九九乘法表
row = 1
while row <= 9:
col = 1
while col <= row:
print(str(col) + "*" + str(row) + "=" + str(col * row), end="\t") # "\t"是制表符
col += 1
print()
row += 1
运行结果
本文标题:005_while练习
本文链接:https://www.haomeiwen.com/subject/xovxuxtx.html
网友评论