Advertisement
ipetkov

Ромб

Feb 4th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. n = 4
  2. for row in range(-n, n+1):
  3.     for col in range(-n, n+1):
  4.         if abs(row) + abs(col) <= n:
  5.             c = '*'
  6.         else:
  7.             c = ' '
  8.         print(c, end='')
  9.     print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement