+ 2

Please help, I only get “child” as an answer no matter what age I put in?

age = 42 if (age > 0 or age < 11): print ('child') elif (age > 12 or age < 17): print ('teen') elif (age > 18 or age < 64): print ('adult') elif (age > 65): print ('senior') else: print ('something else')

5th Oct 2020, 12:24 PM
Sam
Sam - avatar
2 Respuestas
+ 10
Change 'or' to 'and'
5th Oct 2020, 12:25 PM
Julia Shabanova
Julia Shabanova - avatar
+ 4
yep was driving and thinking and realized that it was annouing me like crazy. thank you!
5th Oct 2020, 12:40 PM
Sam
Sam - avatar