
Python InstitutePCEP - Certified Entry-Level Python Programmer
Domain 2Objective 2
PCEP-30-02 2.2 Perform Different Types of Iterations PCEP-30 Practice Questions (Page 1)
Part of the Control Flow Conditional Blocks and Loops domain, which accounts for 29% of the PCEP-30 exam. Python Institute does not publish an official question count, but from its 45-minute exam (~20–30 total, ~6–9 in this domain), expect 3–5 from this objective — we provide 14 practice questions to prepare you well beyond it. (estimate)
14questions here
3free pages
10concepts
29%of the exam
Questions 1–5
- 1
What is the output of the following code? for i in range(3): if i == 1: break else: print("done")
Select an answer first - 2
Which of the following code snippets correctly iterates directly over the characters of the string 'Python' using a for loop with the in keyword?
Select an answer first - 3
What is the output of the following code? for i in range(1, 6, 2): print(i, end=" ")
Select an answer first - 4
Consider the following code: for i in range(3): for j in range(3): if j == 2: break print(i, j) How many lines are printed?
Select an answer first - 5
What is the output of the following code? d = {"a": 1, "b": 2} for key in d: print(key, end=" ")
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Python Institute. “PCEP-30” is a trademark of its owner, used for identification only.