commit a9d2df81b1c89a4fbf03d314adbc6835e181dc60 Author: bot50 Date: Fri Mar 22 08:16:37 2024 +0000 kukemuna-cs50/problems/2024/x/sentimental/mario/more@20240322T081637.056156075Z diff --git a/mario.py b/mario.py new file mode 100644 index 0000000..8647260 --- /dev/null +++ b/mario.py @@ -0,0 +1,14 @@ +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 + "#" * (height - space) + " " + "#" * (height - space), end="") + print() + space -= 1