MCQ Practice Single Best Answer Topic: Python Errors and Exceptions Handling

Q What will be the output after the following statements?
def abc(x):
    try:
        print(20 / x)
    except:
        print('Not a valid argument', end=' ')
print(abc(0))

Question ID
#3974
Subchapter
Python Errors and Exceptions Handling
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A NameError
  • B Not a valid argument
  • C Not a valid argument None
  • D ZeroDivisionError
Correct Answer: C

Explanation

Not a valid argument None

Share This Question

Share this MCQ with your friends or study group.