Question Detail
Question
To correctly concatenate the string "Age: " with the number 20 without causing a TypeError, which Python function should be used to convert the number?
Correct Answer
Option C is the correct answer.
Detailed Explanation
The 'Avoid the TypeError' section (page 10) provides 'The Fix: Convert the number to a string first using str(). "Age: " + str(20) → "Age: 20"'.
Hint
The solution involves converting the number into a string before concatenation.