Im trying to make an Age verification function but i got ERORR | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Im trying to make an Age verification function but i got ERORR

age = str(input()) if age < 12: print("You are not eligible for the app") else: print("You are eligible")

9th Oct 2021, 3:06 PM
Child Exterminator
Child Exterminator - avatar
3 Respostas
+ 5
age=int(input())
9th Oct 2021, 3:19 PM
Prabhas Koya
+ 2
Your "age" variable is a string ā€“ it needs to be integer if you want to compare it to 12
9th Oct 2021, 3:16 PM
Lisa
Lisa - avatar
0
Thanks Prabhas Koya
9th Oct 2021, 3:20 PM
Child Exterminator
Child Exterminator - avatar