Ответ:
from random import randint
n = int(input("Input n: "))
su = 0
for i in range(1, n+1):
for j in range(1, n+1):
a = randint(0, 9)
print(a, end=" ")
if j>i:
su+=a
print()
print(f"sum = {su}")
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
from random import randint
n = int(input("Input n: "))
su = 0
for i in range(1, n+1):
for j in range(1, n+1):
a = randint(0, 9)
print(a, end=" ")
if j>i:
su+=a
print()
print(f"sum = {su}")
Объяснение: