代碼如下:
1 import random
2
3 n = int(input("請輸入行:"))
4 m = int(input("請輸入列:"))
5 x = y = 0
6 while x < n:
7 y = 0
8 while y < m:
9 print(random.randint(1, 100), end="\t")
10 y += 1
11 print()
12 x += 1
運行結果:

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/178826.html
標籤:Python
