Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- for i in range(15):
- N = 10
- x = list(range(0, N))
- y = list(range(-1, N))
- mat = [[0 for j in range(N)] for j in range(N)]
- for i in range(0, N):
- xrand = randint(0, N-i-1)
- yrand = randint(1, N-i)
- mat[x[xrand]][y[yrand]] = 1
- x.pop(xrand)
- y.pop(yrand)
- for i in mat:
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement