From a9d2df81b1c89a4fbf03d314adbc6835e181dc60 Mon Sep 17 00:00:00 2001 From: bot50 Date: Fri, 22 Mar 2024 08:16:37 +0000 Subject: [PATCH] kukemuna-cs50/problems/2024/x/sentimental/mario/more@20240322T081637.056156075Z --- mario.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 mario.py 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