Answer to Question #286509 in Python for Luigie

Question #286509

Create a python program of this output.

Choices:

1 - Output 1

2 - Output 2

3 - Output 3

Enter your choice: 3

Enter a number:5

  * 

  * * 

 * * * 

 * * * * 

* * * * * 

Do you want to try again?: N

Thank you have a good day!


1
Expert's answer
2022-01-12T12:37:09-0500
while True:
	print("Choices:\n1 - Output 1\n2 - Output 2\n3 - Output 3\n")
	choise = input("Enter your choice: ")
	if choise == "3":
		n = int(input("Enter a number: "))
		for i in range(n):
			print(" "*(n-i-1)+"* "*(i+1))
	com = input("Do you want to try again?(y/n): ")
	if com.lower() == "y":
		continue
	if com.lower() == "n":
		break
print("Thank you have a good day!")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS