0
What's wrong with this??
6 Answers
+ 4
Mark Russell
See this again
Age is missing...
age = int(input())
if age>0 and age <=11:
print("Child")
elif age>=12 and age<=17:
print("Teen")
elif age>=18 and age<=64:
print("Adult")
+ 1
There should be a valid expression after and, in your case and logic was followed immediately by <= operator
Also, to make it easier, you can use the range function. For example, the conditional statements could be
if age in range(0, 12):
if age in range (12, 18):
if age in range(18, 65):
0
Age groups
0
In the condition statement add 'age' in the composite condition
0
Nothing is wrong... it works ; )