# Star Display
"""
"""
# Read Number of lines
N = int(input("Enter an odd number : "))
print("Star pattern : ")
tmp=N//2
for n in range(1,tmp+2,1):
print(" "*(tmp-n+1),end="")
print(" * "*((2*n)-1))
for n in range(tmp,0,-1):
print(" "*(tmp-n+1),end="")
print(" * "*((2*n)-1))
No comments:
Post a Comment
Don't be a silent reader...
Leave your comments...
Anu