I am quite a newbie in Python. I wrote this and got this error when i typed a letter in the input:
TypeError: unorderable types: str() >= int()
Here is the code that I wrote:
user_input = input('How old are you?: ')
if user_input >= 18:
print('You are an adult')
elif user_input < 18:
print('You are quite young')
elif user_input == str():
print ('That is not a number')
user_input = int(input('How old are you?: '))- styvaneelif user_input == str()is not how you say "ifuser_inputcan't be parsed as some kind of number." Please read the official Python tutorial. - TigerhawkT3