हिंदी

On giving the "raise syntaxError("HI")" command on Python shell, no exception is raised because the right way to write is:

Advertisements
Advertisements

प्रश्न

On giving the "raise syntaxError("HI")" command on Python shell, no exception is raised because the right way to write is:

विकल्प

  • raise syntaxError("HI")

  • raise SyntaxError("HI")

  • raise SyntaxErrorException("HI")

  • raise syntaxErrorException("HI")

MCQ
Advertisements

उत्तर

raise SyntaxErrorException("HI")

Explanation:

The right syntax error exception to throw is SyntaxErrorException ("HI").

shaalaa.com
Raising Exceptions in Python
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×