Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- a = 1
- b = 0
- for row in range(1, n + 1):
- for column in range(1, row + 1):
- if row % 2 != 0:
- first = a
- second = b
- else:
- first = b
- second = a
- print(f'{first} {second}', end=' ')
- print()
Advertisement
Add Comment
Please, Sign In to add comment