print("Matrica MxM")
i=0
j=0
Y='Y'
N='N'
while i<1:
print("Vvedite M ot 2 do 5")
M = int(input())
if M >= 2 and M<=5:
print("Hotite sami zapolnit matricu?Y/N")
i=i+1
else:
print("Vvedite chislo iz zadannogo promejutka")
while j < 1:
Otvet =input()
if Otvet == Y:
j=j+1
matrix = [[0]*M for n in range(M)]
for x in range(M):
for y in range(M):
matrix[x][y] =int(input("Vvedite elementi ot 0 do 100 "))
for im in range(M):print(matrix[im]
elif Otvet == N:
j=j+1
import random
matrix = [[random.randrange(1,100) for y in range(M)] for z in range(M)]
for im in range(M): print(matrix[im])
else:
print("Vibran neverniy variant otveta, poprobuyite snova")