Skip to content

Instantly share code, notes, and snippets.

@Saarth-Jain
Created October 17, 2020 07:16
Show Gist options
  • Save Saarth-Jain/8df7dcbb1eefbebd82bea137b71ca537 to your computer and use it in GitHub Desktop.
Save Saarth-Jain/8df7dcbb1eefbebd82bea137b71ca537 to your computer and use it in GitHub Desktop.
CS50 Solution pset6 mario less comfortable version
from cs50 import get_int
s = 0
while (s < 1 or s > 8):
s = get_int("Height: ")
blankspaces = s
hashes = 0
for i in range(s):
blankspaces -= 1
hashes += 1
print(" " * blankspaces, end="")
print("#" * hashes, end="")
print("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment