diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-04 07:19:44 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-04 07:19:44 +0000 |
commit | 5782df7353475af2de922918913ffae4d0862f2f (patch) | |
tree | 8c8e11caa8c54239857646c4ebfed3c18f94a501 /wk6/pset/sentimental-mario-more/mario.py | |
parent | 05a7413932e318fefcd7d444feb084de75783728 (diff) |
Sat, May 4, 2024, 12:19 AM -07:00
Diffstat (limited to 'wk6/pset/sentimental-mario-more/mario.py')
-rw-r--r-- | wk6/pset/sentimental-mario-more/mario.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/wk6/pset/sentimental-mario-more/mario.py b/wk6/pset/sentimental-mario-more/mario.py index 3136a7d..883e400 100644 --- a/wk6/pset/sentimental-mario-more/mario.py +++ b/wk6/pset/sentimental-mario-more/mario.py @@ -2,4 +2,16 @@ # get input using get_int # make sure the input is between 1 and 8 # print the pyramids -# +# for i in range(input - 1): + # print(" " * (input - i - 1), "#" * i + 1) + +from cs50 import get_int + +size = 0 + +while size < 1 && size > 8: + size = get_int("Height: ") + +for i in range(input - 1): + print(" " * (input - i - 1), "#" * i + 1) + |