# 第一种方法i = 1 # 行控制while i < 10: j = 1 # 列控制 while j <= i: print('%d * %d = %-4d ...
# 第一种方法i = 1 # 行控制while i < 10: j = 1 # 列控制 while j <= i: print('%d * %d = %-4d ...
for x in range(1,10): print() for y in range(1,x+1): # print('{}*{}={}'.format(x,y, x*y), end=" " ...
使用双重for循环输出九九乘法口诀表 输出结果: 使用do{}while()循环输出乘法口诀表(倒三角输出) 输出结果: ...
运行结果: 发现乘法表有错位,在程序中加入制表符,就解决了 程序如下: 运行结果: ...
blockquote { padding-left: 20px; color: rgba(255, 165, 0, 1); background-color: rgba(69, 69, 69, 1) } 用python的for循环,打印九九乘法表 Python: #! /usr ...
用python实现九九乘法表 代码: 1×1=1 2×1=2 2×2=4 3×1=3 3×2=6 3×3=9 4×1=4 4×2=8 4×3=12 4×4=16 5×1=5 5×2=10 5×3=15 5×4=20 5×5=25 6×1=6 6×2=12 6×3=18 6×4=24 ...
blockquote { padding-left: 20px; color: rgba(255, 165, 0, 1); background-color: rgba(69, 69, 69, 1) } 用python的while循环,打印九九乘法表 自学习编程以来,有的时候,当时觉得 ...