Skip to main contentSkip to solution

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.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question