PCAP • Practice Test 5
Free PCAP practice test — 10 questions with explanations. Set 5. No signup required.
Consider the following code snippet:
try:x = int(input()) y = 10 / x
print(y)except ZeroDivisionError:
print('Division by zero')except ValueError:
print('Invalid integer')If the user enters '0', what is the output?
Choose an answer to begin — your selection is scored in the full session.
10 questions · instant feedback and full explanations after every question.