Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCEP - Certified Entry-Level Python Programmer

Domain 4Objective 1

PCEP-30-02 4.1 Decompose the Code Using Functions PCEP-30 Practice Questions (Page 2)

Part of the Functions and Exceptions domain, which accounts for 28% of the PCEP-30 exam. Python Institute does not publish an official question count, but from its 45-minute exam (~20–30 total, ~6–8 in this domain), expect 2–2 from this objective — we provide 19 practice questions to prepare you well beyond it. (estimate)

19questions here
4free pages
7concepts
28%of the exam

Questions 6–10

  1. 6application · medium

    A developer writes a generator function that yields the squares of numbers from 1 to n. They call it with `squares = square_gen(3)` and then run `print(next(squares))` twice. What is printed?

    Select an answer first
  2. 7application · medium

    A function is defined as `def greet(name, greeting):` and the developer wants to call it with the name 'Alice' and the greeting 'Hello'. Which call is correct?

    Select an answer first
  3. 8application · medium

    A script has the following code: def add(a, b): return a + b result = add(3, 4) print(result) What is printed?

    Select an answer first
  4. 9foundation · easy

    What does the return statement do in a Python function?

    Select an answer first
  5. 10foundation · easy

    What is the value of the variable result after executing the following code? def add(a, b): return a + b result = add(2, 3)

    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.