Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
Location Chicago IL, USA

Exam PCAP topic 1 question 81 discussion

Actual exam question from Python Institute's PCAP
Question #: 81
Topic #: 1
[All PCAP Questions]

What is the expected behavior of the following code?

  • A. it outputs 3
  • B. the code is erroneous and it will not execute
  • C. it outputs 1
  • D. it outputs 2
Show Suggested Answer Hide Answer

Suggested Answer: C

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
lukaki
1 week, 3 days ago
This is ValueError, thus 'except' will be executed. It means answer is C
upvoted 1 times
...
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...