Code 124: Half Diamond Star Pattern | Star patterns using Python | 365 days of Code

preview_player
Показать описание
Title - Half Diamond Star Pattern
Write a Python Program to display star pattern like this:
*
**
***
****
*****
****
***
**
*
"""

n = int(input())
for i in range(n):
for j in range(i+1):
print("*", end="")
print()
for i in range(n-1):
for k in range(n-i-1):
print("*", end="")
print()

# Thanks
Рекомендации по теме