I want the code not to take the input when it is more than 23 or less than 0. It does reject negative values but still values bigger than 23.
height=int(input("select height: "))
while height<0 and height>23:
print("please give input between 1 and 22")
for i in range(height):
print(" "*(height-i)+"#"*(i+1))
I googled some stuff and kinda try to understand with trial and error but I couldn't.
for i in range(height):
print(" "*(height-i)+"#"*(i+1))