sh_11_九九乘法表
1 # 1. 打印 9 行小星星 2 row = 1 3 4 while row <= 9: 5 6 col = 1 7 8 while col <= row: 9 10 # print("*", end="") 11 print("%d * %d = %d" % (col, row, col * row), end=" ") 12 13 col += 1 14 15 # print("%d" % row) 16 print("") 17 18 row += 1
sh_11_九九乘法表
1 # 1. 打印 9 行小星星 2 row = 1 3 4 while row <= 9: 5 6 col = 1 7 8 while col <= row: 9 10 # print("*", end="") 11 print("%d * %d = %d" % (col, row, col * row), end=" ") 12 13 col += 1 14 15 # print("%d" % row) 16 print("") 17 18 row += 1