Skip to main contentSkip to solution

Identify the incorrect built in exception from the following:

Solution

✅ Correct Option: 1

Python has no built-in exception named ValuesError. The correct name is ValueError, which is raised when a function gets an argument of the right type but an inappropriate value, such as int("abc").


Option 2: EOFError is a real built-in, raised when input() hits end-of-file without reading any data.

Option 3: KeyboardInterrupt is a real built-in, raised when the user presses Ctrl+C.

Option 4: IndentationError is a real built-in (a subclass of SyntaxError), raised for incorrect indentation.

Keyboard Shortcuts

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