python3實現
import random
x = y = 0
x_input = int(input("請輸入行的值:"))
y_input = int(input("請輸入列的值:"))
while x < x_input:
y = 0
while y < y_input:
print(random.randint(1, 100), end="\t")
y += 1
print()
x += 1
python3實現
import random
x = y = 0
x_input = int(input("請輸入行的值:"))
y_input = int(input("請輸入列的值:"))
while x < x_input:
y = 0
while y < y_input:
print(random.randint(1, 100), end="\t")
y += 1
print()
x += 1