TypeError
Python raises a type error when an operation is applied to a value of inappropriate type.
Note that the text of the error message depends on the implementation. Different versions of Python and different checking tools will give slightly different messages.
"Age: " + 18TypeError: can only concatenate str (not "int") to str
abs("Hello")TypeError: bad operand type for abs(): 'str'
rectangle(100, 20, "red")TypeError: Invalid type for parameter `color`: expected `Color`, got `str`

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version a9143b0 (Sun, 14 Dec 2025 12:09:46 GMT)