Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ____________________________________________________________________
- # reads n from the console
- n = int(input())
- row = n
- col = n
- # outer loop - looping through r for rows
- for r in range(row):
- # inner loop - looping through c for columbs
- for c in range(1, col + 1):
- print(f'{r + c}', end=' ')
- c = c + 1
- print()
- # ____________________________________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement