Single Choice Not Set

QWhat type of error will be shown after the following statement?
a = int('hello')

ID: #3794 Python Errors and Exceptions Handling 454 views
Question Info
#3794Q ID
Not SetDifficulty
Python Errors and Exceptions HandlingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A SyntaxError
  • B TypeError
  • C ValueError
  • D NameError
Correct Answer

Explanation

ValueError
 
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [1], in ()
----> 1 a = int('hello')

ValueError: invalid literal for int() with base 10: 'hello'

Share This Question

Challenge a friend or share with your study group.