Here is my code:
age = input("How old are you?: ")
print (age)
print (type(age))
Result:
How old are you?: 35
35
class 'str' <<--- This is problem!
But, If I use..
age = int(input("How old are you?: "))
print (age)
print (type(age))
and entered "Alex"
How old are you?: alex
Traceback (most recent call last):
File "/Users/kanapatgreenigorn/Desktop/test.py", line 1, in age = int(input("How old are you?: "))ValueError: invalid literal for int() with base 10: 'alex'