Multiple Choice
The following code uses exception handling to xe "except clause"catch and xe "handle (or resolve) an exception"handle any ValueErrors and ZeroDivisionErrors that arise. 1 while True:
2 try:
3 number1 = int(input('Enter numerator: ') )
4 number2 = int(input('Enter denominator: ') )
5 result = number1 / number2
6 except ValueError:
7 print('You must enter two integers\n')
8 except ZeroDivisionError:
9 print('Attempted to divide by zero\n')
10 else:
11 print(f'{number1:.3f} / {number2:.3f} = {result:.3f}')
12 break
Where in the code could either or both of these errors arise?
A) line 3
B) line 5
C) lines 3 and 4
D) lines 3, 4 and 5
Correct Answer:

Verified
Correct Answer:
Verified
Q20: The json module's _ function reads the
Q21: Which of the following statements a), b)
Q22: Which of the following statements a), b)
Q23: Various types of exceptions can occur when
Q24: The int function raises a _ if
Q25: Which of the following statements are false?<br>A)
Q26: Which of the following statements a), b)
Q28: Which of the following statements is false?<br>A)
Q29: Which of the following statements a), b)
Q30: Which of the following statements is false?<br>A)