Name the built in exception raised when an operator is supplied with a value of incorrect data type.
Name the built in exception raised when an operator is supplied with a value of incorrect data type.
Solution
✅ Correct Option: 3
TypeError is raised when an operator or function is applied to an object of the wrong data type, for example (adding a string to an integer).
ValueError: the data type is correct but the value is not acceptable, for example .
NameError: raised when a variable or function name is used before it is defined.
IOError: raised when an input/output operation such as opening a file fails.
Related questions:
2025: 16 May Shift 1
2026: 23 May Shift 2
2025: 3 June Shift 2