Hey can you help me with boolean? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Hey can you help me with boolean?

age = int(input()) if age<=11 and age>=0: print('Child') elif age>=12 and age<=17: print('Teen') elif age>=18 and age<=64: print('Adult') else: print('Senior') Why is it not working propely?

20th Dec 2021, 10:05 PM
Dawid Kępka
1 Resposta
+ 1
Indentation, you check are age is between 0 and 11 and than inside this you expect age to be more than 12 this will never run. just writte: if age <=11 and age >=0 : //code to run elif age>=12 and age <=17: //code to run else: //even more code
20th Dec 2021, 10:24 PM
PanicS
PanicS - avatar