Skip to content

Instantly share code, notes, and snippets.

@jinnosux
Created May 7, 2020 20:04
Show Gist options
  • Save jinnosux/1e123fa5653212ee0ccdc9b77dce12fa to your computer and use it in GitHub Desktop.
Save jinnosux/1e123fa5653212ee0ccdc9b77dce12fa to your computer and use it in GitHub Desktop.
Mario problemset in py
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