Skip to main contentSkip to solution

Match the LIST-I with LIST-II

LIST-ILIST-II
A.ImportErrorI.Raised when the subscript in a sequence is out of range
B.EOFErrorII.Raised when there is an error in the syntax of Python code
C.IndexErrorIII.Raised when the requested module definition is not found
D.SyntaxErrorIV.Raised when the end of file condition is reached without reading any data by input()

Solution

✅ Correct Option: 2
List IList II
(A) ImportError(III) Raised when the requested module definition is not found
(B) EOFError(IV) Raised when the end of file condition is reached without reading any data by input()
(C) IndexError(I) Raised when the subscript in a sequence is out of range
(D) SyntaxError(II) Raised when there is an error in the syntax of Python code

ImportError and IndexError are easy to mix up because both involve "finding" something. Import is about modules, Index is about positions in a list or tuple.

Keyboard Shortcuts

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