PCAP • Practice Exam 3 — 20 Questions
Free PCAP practice exam 3 — 20 questions with explanations. 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.
20 questions · instant feedback and full explanations after every question.