diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-04 07:30:21 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-04 07:30:21 +0000 |
commit | a1a60d921c9ab0b62161a9efa3ec1e4238cb4c9c (patch) | |
tree | 89f494c280e9dcc901622bae8ff62ce57bf1a1c8 /wk6/pset | |
parent | fd548d7911f36db8c313e92c153b6c3822b83766 (diff) |
Sat, May 4, 2024, 12:30 AM -07:00
Diffstat (limited to 'wk6/pset')
-rw-r--r-- | wk6/pset/sentimental-mario-more/mario.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wk6/pset/sentimental-mario-more/mario.py b/wk6/pset/sentimental-mario-more/mario.py index 07fb1c5..dfec5e0 100644 --- a/wk6/pset/sentimental-mario-more/mario.py +++ b/wk6/pset/sentimental-mario-more/mario.py @@ -7,11 +7,12 @@ from cs50 import get_int -size = 16 -while (size < 1) and (size > 8): +while True: size = get_int("Height: ") + if size > 0 and size < 9: + break -for i in range(size - 1): +for i in range(size): print(" " * (size - i - 1), "#" * (i + 1), "", "#" * (i + 1), " " * (size - i - 1)) |