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)