返回列表 發帖

巢狀迴圈 (一) - 九九乘法表

顯示如下之九九乘法表

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print("%d*%d=%-2d"%(i,j,i*j),end="  ")
  4.     print()
複製代碼
  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print("{}*{}={}".format(i,j,i*j),end="\t")
  4.     print()
複製代碼
  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print("%d*%d=%-2d"%(i,j,i*j),end=" ")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4. print()
複製代碼

TOP

for i in range(1,10):
    for j in range(1,10):
        print(f"{i}*{j}={i*j}",end="\t")

TOP

for i in range(1,10):
    for j in range(1,10):
        print(f"{i}*{j}={i*j}",end="\t")
    print()

TOP

for i in range(1,10):
     for j in range(1,10):
          print(f"{i}*{j}={i*j})",end="\t")

TOP

  1. for i in range(1,10,1):
  2.     for i2 in range(1,10,1):
  3.         print("%d*%d=%2d"%(i,i2,i*i2),end="  ")
  4.     print("")
複製代碼

TOP

for i in range(1,10):
    for j in range(1,10):
        print(f"{i}*{j}={i*j}",end="\t")

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print("%d*%d=%-2d"%(i,j,i*j),end="  ")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end=" ")
  4.         
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.       print(f"{i}*{j}={i*j}",end="\t")  
  4.       
複製代碼
Attention Seeker </3

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):  
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()     
複製代碼
151451624321342134232583272857252

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
  5.   
複製代碼

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

TOP

8

TOP

  1. for i in range(1,10):
  2.     for j in range(1,10):
  3.         print(f"{i}*{j}={i*j}",end="\t")
  4.     print()
複製代碼

TOP

  1. for i in range(1,10):
  2.    for j in range(1,10):
  3.      print(f"{i}*{j}={i*j}",end="\t")
  4.    print()
複製代碼

TOP

返回列表