summaryrefslogtreecommitdiff
path: root/wk6/pset/sentimental-mario-more
diff options
context:
space:
mode:
Diffstat (limited to 'wk6/pset/sentimental-mario-more')
-rw-r--r--wk6/pset/sentimental-mario-more/mario.py7
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))