Astrologer's star pattern using python
Hey guys once again welcome to the Decoders blog, I hope you all are doing well and today I'm present with Astrologer's star pattern(make pattern on the basis of your input) which you can create using python, The given code will help you to built it, so just follow the codes and make your pattern easily , and enjoy it with your friends
num1=int(input("enter how many rows of stars you wanna print"))
_true_false=bool(int(input("choose either 0 or 1: ")))
if _true_false== True:
c=1
while c<=num1:
print(c*"*")
c=c+1
else:
while num1>0:
print(num1*"*")
num1=num1-1
Comments
Post a Comment