Ch 23 if elif else statement
age=input("enter your age please")
age=int(age)
if age==0:
print("you canr watch the movie")
if 0<age<=3:
print("ticker price 100")
elif 3<age<=10:
print("ticker price 200")
elif 10<age<=60:
print("ticker price 300")
else:
print("you cant watch the movie")
I mistaken in this code i always blank the line in starting on if and elif or else the space is cause the error in the code beware to the blank and space remember that always!
Comments
Post a Comment