The program contains a data type mismatch error.
The issue arises on the line:
print("You are " + age + " years old.")
Here, age
is an integer (the result of int(input(...))
), but the +
operator is being used to concatenate it with a string. This will result in a TypeError
because you cannot directly concatenate a string and an integer in Python.
To fix this, you could convert age
back to a string using str(age)
, like this:
print("You are " + str(age) + " years old.")
So the correct answer is data type mismatch.