Skip to content

Instantly share code, notes, and snippets.

@moqdm
Last active September 6, 2021 13:30
Show Gist options
  • Save moqdm/93a57accbb76d9ca17c0239a2d225870 to your computer and use it in GitHub Desktop.
Save moqdm/93a57accbb76d9ca17c0239a2d225870 to your computer and use it in GitHub Desktop.
it's my PSet 6: Sentimental / Mario (More) 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 row in range(1, (h + 1), 1):
print(" " * (h - row), end="")
print("#" * row, end="")
print(" " * 2, end="")
print("#" * row, end="")
print("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment