Created
May 7, 2020 20:04
-
-
Save jinnosux/1e123fa5653212ee0ccdc9b77dce12fa to your computer and use it in GitHub Desktop.
Mario problemset in py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cs50 import get_int | |
while True: | |
height = get_int("Enter height of half-pyramid: ") | |
if height >= 1 and height <= 8: | |
break | |
for i in range(height): | |
print(' ' * (height-1-i), end="") | |
print('#' * (i+1), end="") | |
print(' ', end="") | |
print('#' * (i+1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment