Can someone please point out what's wrong with my code?
from cs50 import get_int
def main():
print("Height should be a positive integer between 0 and 23.")
# a "do-while" loop to recieve a height between 0 & 23
while True:
height = get_int("Insert Height: ")
if height >= 0 and height <= 23:
break
spaces = height
for i in range(height):
# print spaces
print(" " * (spaces - 1), end="")
spaces -= 1
# print hashes
hashes = height - spaces
print("#" * hashes, end="")
print(" ", end="")
print("#" * hashes, end="")
# print a new line
print()
if __name__ == "__main__":
main()
print("Height should be a positive integer between 0 and 23.")
. Can only speculate that it interferes with check50 capture/parse of stdout.