plarmi

13122023_3

Dec 13th, 2023
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. rows = int(input("Введите кол-во строк"))
  2.  
  3. if rows % 2 != 0:
  4.     for i in range(1, rows + 1, 2):
  5.         print(" " * ((rows - i) // 2) + "*" * i)
  6.  
  7.     for i in range(rows - 2, 0, -2):
  8.         print(" " * ((rows - i) // 2) + "*" * i)
  9. else:
  10.     print("Кол-во строк должно быть нечётным!")
Add Comment
Please, Sign In to add comment