Skip to content

Instantly share code, notes, and snippets.

@moqdm
Last active September 6, 2021 13:29
Show Gist options
  • Save moqdm/04fc0d61a8878a58ed20302b7ae4eec0 to your computer and use it in GitHub Desktop.
Save moqdm/04fc0d61a8878a58ed20302b7ae4eec0 to your computer and use it in GitHub Desktop.
it's my PSet 6: Sentimental / Mario (Less) solution... *Please just take a look if you couldn't solve it ... Thank you πŸ™‚ #cs50
from cs50 import get_int
# Notification
print("Welcome, Please enter a number from one to eight to build.")
# Getting height.
h = 0
while 1 > h or h > 8:
h = get_int("Height: ")
# Build.
for i in range(h):
print((h - 1 - i) * " ", end="")
print((i + 1) * "#")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment