From 5782df7353475af2de922918913ffae4d0862f2f Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sat, 4 May 2024 07:19:44 +0000 Subject: Sat, May 4, 2024, 12:19 AM -07:00 --- wk6/pset/sentimental-mario-more/mario.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'wk6/pset/sentimental-mario-more') 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) + -- cgit v1.2.3