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 f5b96bc (Sun, 04 Jan 2026 17:27:49 GMT)