Advertisement
nikol_bratkova

Untitled

Apr 26th, 2022
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. # ____________________________________________________________________
  2.  
  3. # reads n from the console
  4. n = int(input())
  5. row = n
  6. col = n
  7.  
  8. # outer loop - looping through r for rows
  9. for r in range(row):
  10. # inner loop - looping through c for columbs
  11. for c in range(1, col + 1):
  12. print(f'{r + c}', end=' ')
  13. c = c + 1
  14. print()
  15.  
  16. # ____________________________________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement