PCEP Practice Question: Functions, Tuples, Dictionaries and Exceptions
Which THREE of the following are built-in exceptions in Python? (Select three.)
⚠ Common exam trap
The PCEP exam often tests candidates by including plausible-sounding but non-existent exception names like 'LoopError' or 'DivisionError', expecting test-takers to rely on memory of actual built-in exceptions rather than guessing based on similarity to common error messages.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
StopIteration
StopIteration is a built-in exception in Python that is raised to signal the end of an iterator. It is automatically raised by the __next__() method when there are no further items to iterate over, and is caught by for loops internally to terminate iteration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
StopIteration
Why this is correct
Correct.
- ✓
ValueError
Why this is correct
Correct.
- ✗
LoopError
Why it's wrong here
Incorrect; no such exception.
- ✓
TypeError
Why this is correct
Correct.
- ✗
DivisionError
Why it's wrong here
Incorrect; the correct name is ZeroDivisionError.
Go deeper
Related to this question
About these practice questions
This PCEP question is part of Courseiva's 482-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCEP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCEP exam.