Header Ads

Responsive Ads Here

Diamond star series with python

 Diamond Star Series


stars = int(input("How many columns do you want of stars: "))

for i in range(stars, -1, -1):
    print(" " * i, "* " * (stars - i))

for j in range(1, stars + 1):
    print(" " * j, "* " * (stars - j))


Output







YouTube Video: https://www.youtube.com/watch?v=Y1WvBPZQ_Ag

Powered by Blogger.