
Python InstitutePCEP - Certified Entry-Level Python Programmer
Domain 1Objective 2
PCEP-30-02 1.2 Understand Pythons Logic and Structure PCEP-30 Practice Questions (Page 4)
Part of the Computer Programming and Python Fundamentals domain, which accounts for 18% of the PCEP-30 exam. Python Institute does not publish an official question count, but from its 45-minute exam (~20–30 total, ~4–5 in this domain), expect 1–1 from this objective — we provide 22 practice questions to prepare you well beyond it. (estimate)
22questions here
5free pages
8concepts
18%of the exam
Questions 16–20
- 16
A developer is writing a loop that prints numbers from 1 to 5. They write the following code: for i in range(1, 6): print(i) What is the role of the keyword 'for' in this statement?
Select an answer first - 17
What happens when the interpreter encounters a line that starts with #?
Select an answer first - 18
Which of the following will cause an IndentationError?
Select an answer first - 19
A developer is writing a script and wants to add a note explaining what a particular line of code does. They write: # This line calculates the total price total = price * quantity What happens when the interpreter executes the first line?
Select an answer first - 20
A developer is writing a function and wants to add a multi-line description that can be accessed by other tools and documentation generators. Which approach should they use?
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.