Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCEP - Certified Entry-Level Python Programmer

Domain 3Objective 3

PCEP-30-02 3.3 Collect and Process Data Using Dictionaries PCEP-30 Practice Questions (Page 4)

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

19questions here
4free pages
9concepts
25%of the exam

Questions 16–19

  1. 16foundation · easy

    Given `d = {'x': 1, 'y': 2}`, what is the result of executing `del d['x']`?

    Select an answer first
  2. 17expert · hard

    A developer maintains a dictionary `cache = {'a': 1, 'b': 2, 'c': 3}`. The code must remove the LAST inserted key-value pair and return it as a tuple, but ONLY if the dictionary is not empty; otherwise it must return `None` without raising an error. Which code is correct?

    Select an answer first
  3. 18application · medium

    A dictionary `cache = {'a': 1, 'b': 2, 'c': 3}` is used as a simple cache. The developer must remove the key `'b'` if it exists, WITHOUT raising an error if it is absent. Which code is correct?

    Select an answer first
  4. 19application · medium

    A dictionary `settings = {'volume': 50, 'brightness': 70}` stores user preferences. The developer must increase the volume by 10, creating the key if it does not exist. Which code correctly updates the dictionary?

    Select an answer first
Finished these 4 questions?

Review the revealed explanations, or continue through the curriculum.

No more pagesBack to PCEP-30

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.