commit 3a7d7e51a4f83b783a1a839274f1d9b94e0f6678 Author: bot50 Date: Fri Mar 22 07:59:11 2024 +0000 kukemuna-cs50/problems/2024/x/sentimental/mario/less@20240322T075911.126705552Z diff --git a/mario.py b/mario.py new file mode 100644 index 0000000..9503924 --- /dev/null +++ b/mario.py @@ -0,0 +1,15 @@ +while True: + try: + height = int(input("Height: ")) + if height in range(1, 9): + break + except: + ValueError + +space = height - 1 + +for r in range(height): + print(" " * space, end="") + print("#" * (height - space), end="") + print() + space -= 1