Which of the following is not a built-in exception in python?
Which of the following is not a built-in exception in python?
Solution
✅ Correct Option: 4
Python has no built-in exception called SizeError. Python's built-in exceptions include KeyboardInterrupt, NameError and EOFError, but there is no exception for size. The nearest real ones are MemoryError, OverflowError and ValueError.
KeyboardInterrupt: built-in, raised when the user presses Ctrl+C.
NameError: built-in, raised when a variable or name is used before it is defined.
EOFError: built-in, raised when input() reaches end of file without reading any data.
Related questions:
2025: 3 June Shift 2
2026: 23 May Shift 1