9.8k views
5 votes
Python please help.

Why I’m i getting this error

Python please help. Why I’m i getting this error-example-1
User Borges
by
5.1k points

1 Answer

4 votes

So, age is a of type string when it should be of type int.

def main():

age = int(input("How old are you? "))

if age >= 13:

#the rest of your code.

Strings cannot be greater than another string only integers and other number based data types. Also, you should change the list variable as I mentioned on the earlier question. Best of luck.

User Roet
by
4.8k points