PCEP-30-02 practice question 20 of 35

What is the output of the following code snippet if the user enters a 0? try: val = input('Enter a value: ') print(int(val) / len(val)) except…

Choose your answer, then check it against the explanation.

Domain Functions and Exceptions

What is the output of the following code snippet if the user enters a 0? try: val = input('Enter a value: ') print(int(val) / len(val)) except ZeroDivisionError: print('ZeroDivisionError raised...') except: print('Bad input...')
Answer options
Question 20 of 35

Keep practicing

Take the free PCEP-30-02 practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other PCEP-30-02 practice questions

Scroll to Top