I'm currently at pset6 from cs50, mario-less. My code compiles and prints the left aligned pyramid as the problem asks, but when I do a check50, most of them fail. What is the problem?
from cs50 import get_int
# Ask user for input
n = get_int("Height: ")
# While loop to check condition
while n < 1 or n > 8:
print("Invalid number ")
n = get_int("Enter another number: ")
# One for loop to prin left sided piramid
for j in range(1, n + 1):
spaces = n - j + 1
print(" " * spaces + "#" * j)