Hour Glass Pattern Using Python | Python Pattern Using Loop | Learn Python Programming | Python Loop

preview_player
Показать описание
Hourglass is one of famous pattern in python. After watching this video, you will be able to implement this using simple for loop.
**********
To learn Python, start our Python Playlist HERE:

Subscribe to CodeAsItIs:

**********
**********
Connect with us!

**********

Thank you!
CodeAsItIs
Рекомендации по теме
Комментарии
Автор

a = int(input())
for i in range(a):
spaces = " " * i
stars = "* " * (a-i)
print(spaces+stars)
for j in range(1, i+1):
spaces = " " * (a-j-1)
stars = "* " * (j+1)
print(spaces+stars)

rajeshgoruva
join shbcf.ru