0
age = int(input()) if(age == 0 and age <= 11): print('Child') elif(age >= 11 and age <= 17): print('Teen') elif(age > 17
Is anything wrong in this code
3 odpowiedzi
+ 3
at the last part it lacks the ending parenthesis ")" , the colon ":" and the last statement
so it should be like this
age = int(input())
if(age == 0 and age <= 11):
print('Child')
elif(age >= 11 and age <= 17):
print('Teen')
elif(age > 17):
print ("adult")
+ 3
I think atlast you can keep else instead of elif like this
age = int(input())
if(age == 0 and age <= 11):
print('Child')
elif(age >= 11 and age <= 19):
print('Teen')
else:
Print("adult")
+ 3
Also, you should change age == 0 on age >= 0, since your programme will print "Child" only when age is 0