4 Answers
+ 3
Ali Jouni
Your code is approximately right but you didn't follow a proper indentation and also you missed to print "Senior"
in 1st elif should be >= 12 because you already have <= 11 in if block
You code should have indentation means elif should start from just below if like this:
age = int(input())
# your code goes here
if age >= 0 and age <= 11:
print ("Child")
elif age >= 12 and age <= 17:
print ("Teen")
elif age >= 18 and age <= 64:
print ("Adult")
else:
print ("Senior")
+ 2
Thanks for your help
By the way regarding the 1st elif was misstyping
+ 1
Don't ask for code, ask for solution so you need to show your attempts.
0
age = int(input())
if age > 0 and age <= 11 :
print("Child")
elif age >= 11 and age <= 17 :
print("Teen")
elif age >= 18 and age <= 64 :
print("Adult")
this is my code , ans its not working