Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input())
- for i in range(a):
- for j in range(a):
- if i % 2 == 0 and j % 2 == 0:
- if i == 0 or i == a-1 or j == 0 or j == a -1:
- print(0,end = ' ')
- else:
- print(1,end = ' ')
- else:
- print(1 , end = ' ')
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement