Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCPP-32-101 All Questions

View all questions & answers for the PCPP-32-101 exam

Exam PCPP-32-101 topic 1 question 2 discussion

Actual exam question from Python Institute's PCPP-32-101
Question #: 2
Topic #: 1
[All PCPP-32-101 Questions]

Analyze the following snippet and select the statement that best describes it.

  • A. The code is an example of implicitly chained exceptions.
  • B. The code is erroneous as the OwnMath class does not inherit from any Exception type class
  • C. The code is fine and the script execution is not interrupted by any exception.
  • D. The code is an example of explicitly chained exceptions
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
trebornamor
11 months, 2 weeks ago
Selected Answer: B
The answer is B. The OwnMath class needs inherit BaseException. class OwnMath(BaseException): pass
upvoted 1 times
...
ghozlane
1 year, 1 month ago
Selected Answer: B
ive tested this code .. the answer is B
upvoted 1 times
...
tankwayep
1 year, 2 months ago
Selected Answer: B
Answer is B
upvoted 1 times
...
_cherre_
1 year, 4 months ago
Selected Answer: B
I've tested this code and got the error TypeError: exceptions must derive from BaseException
upvoted 1 times
...
w_w_w_w_w_w
1 year, 4 months ago
Selected Answer: B
OwnMath should be derived from BaseException. Run this code and you'll get an exception. If it is derived, it's an example of explicitly chained exception.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
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 ...