+ 2

New question :D

Hello . Boolean Logic Given the age of a person as input, you need to output their age group. Here are the age groups you need to handle: Child: 0 to 11 Teen: 12 to 17 Adult: 18 to 64 Senior: 65+ Sample Input 42 Sample Output Adult i tried like it : 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") elif age >=65: print("Senior") else: print("Invalid age") all exampel was right without one exampel in the 12 age

8th Oct 2021, 10:34 AM
Raoof Zakarna
7 Réponses
+ 7
Have a look at your print statement for Teen. Your mistake is after print & before ( 🤣😂🤣 I love typos. Good code, fix it and well done
8th Oct 2021, 10:42 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
oooh ! hahah yes i see it now thank you so much , i try to write for you but i have litell problem to active my account
8th Oct 2021, 10:54 AM
Raoof Zakarna
+ 1
Yes you have right
9th Oct 2021, 3:31 PM
Raoof Zakarna
0
Is it Java?
9th Oct 2021, 12:47 PM
Леонид Серегин
Леонид Серегин - avatar
0
no this is paython
9th Oct 2021, 12:53 PM
Raoof Zakarna
0
No is not paython is phyton
9th Oct 2021, 3:30 PM
Child Exterminator
Child Exterminator - avatar
0
:D
9th Oct 2021, 3:32 PM
Child Exterminator
Child Exterminator - avatar