0

This is my code in python

 import cs50

while True:
    print("height: ", end="")
    height= cs50.get_int();
    if height>=0 and height<=23:
        break

for i in range(1,height+1):
    print(" "*(height-i), end="")
    print("#"*i, end="")

    print(" ",end="")
    print("#"*i)

1 Answer 1

1

There should be two spaces between half-pyramids.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .