# 第一種方法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循環,打印九九乘法表 自學習編程以來,有的時候,當時覺得 ...