Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

Python Institute PCEP-30-02 Dumps 2026 with Free Practice Questions and Answers

Practise for the PCEP - Certified Entry-Level Python Programmer exam with 12 original questions, each with an answer and explanation.

Topics: Control Flow, Automated Jobs & Scheduled Maintenance, Computer Programming Fundamentals, Data Collections and 3 more.

Includes single answer, multiple answers, drag and drop, dropdown and order list. A new question is added every 15 days.

PCEP-30-02 Practice Set Details

Exam Code
PCEP-30-02
Questions On This Page
12
Exam Topics Covered
7 of 8
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
30
Certification
Certified Entry-Level Python Programmer
12 questions

Python Institute PCEP-30-02 Exam Questions and Answers by Topic

Computer Programming Fundamentals

2 practice questions on this topicWhat this topic covers

Question 1

Added

Single Answer

A Python 3 script calculates a team's total hours from two inputs read as strings: `planned` and `actual`. The developer writes `total = planned + actual` and then compares `total > 40`. A test with inputs `"18"` and `"25"` produces `"1825"`, and the comparison raises a TypeError. The team needs numeric addition and comparison, while preserving the original input strings for an audit log. Which change best meets these requirements?

Correct answer: B

Converting each string before applying `+` makes the operator perform integer addition, so the result is 43 and can be compared with the integer 40. The original variables remain strings for the audit log. Comparing with `"40"` in B does not fix concatenation and also compares strings. C converts the concatenated value `"1825"`, producing the wrong total. D multiplies strings and then compares incompatible types.

Question 2

Added

Single Answer

A small analytics team is onboarding a coordinator who must read and make minor edits to a Python 3 script that imports CSV data. The script will run on an approved workstation with Python installed; the team will not distribute a standalone executable. A proposed edit changes a variable name from total-hours to total_hours and moves a statement so it is indented under an if block. The coordinator asks why these changes matter when the code looks nearly identical. Which explanation is technically accurate and most useful?

Correct answer: C

Python's interpreter processes the source, and indentation is syntactically significant because it identifies the statements belonging to a compound statement such as an if block. An identifier cannot contain a hyphen, which Python parses as the subtraction operator, so total_hours is valid while total-hours is not a single variable name. Python does not require this script to be packaged as a standalone executable. Indentation is not merely ignored styling, and comments do not establish block scope.

Control Flow

3 practice questions on this topicWhat this topic covers

Question 3

Added

Order List

A team lead is reviewing a small Python change that should classify a measured value, process every value in a list, and report the number of values that qualify. The implementation must initialize its accumulator before iteration and must not count values that fail the condition. Arrange the implementation steps in the order they should be performed.

Drag the steps into the correct order, or use the arrows.

  1. Test the current value against the qualifying condition.
  2. Increment the counter when the condition is true.
  3. Iterate through each value in the input list.
  4. Initialize the qualifying-value counter to zero.
Correct answer:
  1. Initialize the qualifying-value counter to zero.
  2. Iterate through each value in the input list.
  3. Test the current value against the qualifying condition.
  4. Increment the counter when the condition is true.

The counter must exist before the loop so it can accumulate results across iterations. The loop then visits each input value, and the conditional test determines whether the current value qualifies. Incrementing belongs inside the true branch, after the test, so values that fail are not counted. Incrementing before iteration would count nothing useful or reference an uninitialized variable, while testing only after the loop would lose the per-value decision.

Question 4

Added

Single Answer

A coordinator processes a list of daily effort values and needs the first value that exceeds a reporting threshold. Values are already ordered by date, and the program must stop examining later days as soon as it finds a match. If no value qualifies, it should report that none was found. The code must remain a straightforward loop; using a list comprehension would still evaluate all values and would not express the required early exit. Which approach is best?

Correct answer: D

A for loop naturally visits the values in order, and break ends that loop immediately when the first qualifying value is found. Checking the result after the loop distinguishes a match from the no-match case. Continue skips to the next iteration rather than stopping, so it would not meet the early-exit requirement. Incrementing a while-loop index before testing can skip the current element and requires additional bounds handling. An if-elif chain does not scale to an arbitrary-length list.

Question 5

Added

Single Answer

A Python utility receives a nonnegative number of completed work items and must print every number from zero up to, but not including, that count. The count can be zero, so the program must print nothing in that case. The code should use range rather than manually updating a while-loop counter, and the range must not include the final count. Which loop implements the requirement?

Correct answer: B

range(count) generates integers beginning at zero and stopping before count, which produces exactly the required sequence. When count is zero, the range is empty and the loop body runs zero times. Starting at one omits zero and includes count through a different endpoint convention. Adding one makes the final count appear, while subtracting one excludes the value immediately before the required stopping point and can also produce an empty sequence too early.

Data Collections

2 practice questions on this topicWhat this topic covers

Question 6

Added

Drag And Drop

A reporting script receives project data that must be represented using the simplest suitable built-in collection for each role. A project identifier maps to a value, a fixed pair of coordinates must not be reassigned, and a sequence of weekly totals must support indexed access and updates. Match each requirement to the appropriate collection type.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

Keep weekly totals in order and update an entry by index
Store a coordinate pair that should remain fixed
Look up a project's status using its identifier
Tuple
Dictionary
List
Correct answer:
  • Look up a project's status using its identifier → Dictionary
  • Store a coordinate pair that should remain fixed → Tuple
  • Keep weekly totals in order and update an entry by index → List

A dictionary maps keys such as project identifiers to associated values, making status lookup direct. A tuple is appropriate for a fixed pair when the collection itself should not be reassigned. A list preserves order, supports indexing, and is mutable, so it fits weekly totals that may be updated. Using a list for keyed status lookup would require extra searching, while a tuple cannot be updated by index. A dictionary is not the natural representation for the ordered, position-based totals sequence.

Question 7

Added

Dropdown

A coordinator must create a new list containing only positive effort values from an existing list, preserving their original order. The source list must remain unchanged, and the team wants a concise Python expression. Complete the expression with the correct syntax.

Choose the correct value for each blank.

positive = [value for value in effort if ]
Correct answer:

positive = [value for value in effort if value > 0]

The list comprehension evaluates its filter once for each value produced by iterating over effort. The condition value > 0 retains only positive values and preserves their source order, while producing a separate list rather than changing effort. Indexing effort with value is incorrect because value is an element, not necessarily an integer index. Assignment is not a Boolean filter expression, and membership in effort would be true for every value yielded by that iteration.

Functions and Exceptions

1 practice question on this topicWhat this topic covers

Question 8

Added

Single Answer

A team is writing a helper that accepts a project budget and a rate, computes their quotient, and is reused by several callers. A zero rate is invalid input, but callers should receive a clear indication of that invalid input rather than a fabricated numeric result. The helper must not terminate the whole process, and the team wants ordinary callers to be able to handle the problem with a try-except block. Which implementation strategy is best?

Correct answer: C

A zero rate is invalid input, so raising ValueError communicates the problem without ending the process. A caller can catch that specific exception and choose an appropriate response. Returning zero silently confuses an invalid calculation with a legitimate numeric result. Catching every exception and returning text changes the helper's result type and can hide unrelated programming errors. Recursion cannot make a zero divisor valid and would add unnecessary calls rather than clarify the failure.

Configuration Management

1 practice question on this topicWhat this topic covers

Question 9

Added

Multiple Answers

A consulting group is standardizing time entry for project teams in its work-management environment. Consultants currently enter time against tasks, while managers need a consistent user experience across the project pages they use for review. The administrator can change page layouts and the Task Time Entry Mode, but cannot introduce custom code or buy an add-on. Managers should see the fields already available on the standard project page, and consultants must continue entering time through tasks rather than switching to a separate timesheet workflow. Which two configuration actions best meet these requirements? (Choose two.)

Correct answer: C, D

Keeping time entry task-based requires the corresponding Task Time Entry Mode, while manager visibility is addressed by configuring the applicable page layout to show existing fields. The requirement explicitly rules out custom code, so replacing the page with a coded interface is not suitable. A dashboard folder organizes reports and dashboards; it is not a time-entry surface. Task records cannot be converted into report folders, and doing so would not configure either the entry mode or the project page.

Automated Jobs & Scheduled Maintenance

2 practice questions on this topicWhat this topic covers

Question 10

Added

Single Answer

A project-services company runs a nightly calculation job that updates actuals for several hundred projects. Following a change in the calculation schedule, the job has started overlapping with the next night's run, and administrators also see months of successful and failed entries in the App Log. Finance requires a reviewable record of recent failures, but the team has no requirement to retain routine success entries indefinitely. The job's calculations are correct when it completes, so changing the calculation logic is out of scope. What is the best operational response?

Correct answer: B

The schedule and run history should be reviewed first so the overlapping executions can be addressed without discarding a working calculation. App Log maintenance can remove unnecessary old entries while preserving the recent failure evidence Finance needs. Deleting and recreating the job risks losing its configuration and does not itself prevent a recurrence. Changing the Actuals Configuration Group is not justified when completed calculations are already correct. Disabling log maintenance increases the buildup, and duplicating the job makes overlap more likely.

Question 11

Added

Single Answer

An operations manager is preparing a routine cleanup plan for a service that records application events. Investigators must still be able to review recent errors after a release, but successful entries older than the agreed retention window are no longer needed. The scheduled calculation jobs are completing on time, and their Actuals Configuration Group settings have already been approved. The manager wants to reduce log growth without changing calculation behavior or removing evidence needed for current incident review. What should be done next?

Correct answer: B

App Log maintenance should follow a review of the records and the agreed retention policy. Removing entries outside that window limits unnecessary growth while preserving recent error evidence for release investigations. Changing the Actuals Configuration Group would alter calculation behavior without addressing the stated retention need. Deleting scheduled jobs would disrupt operations and cannot make the log reconstruct future results. Clearing everything and disabling cleanup both discard useful incident evidence and undermine routine maintenance.

User Management

1 practice question on this topicWhat this topic covers

Question 12

Added

Multiple Answers

A new analyst needs access to a workspace used by the forecasting team. The analyst must be able to open the required application and perform only the actions authorized for the analyst persona; they must not receive the broader administrative capabilities assigned to team leads. The organization already has an appropriate profile and a permission set for the additional forecasting capability, and its package requires a license for users who access it. Which three actions should the administrator take? (Choose three.)

Correct answer: A, B, C

The profile establishes the user's baseline access, the permission set supplies the additional forecasting permission, and the package license enables access to the licensed package. Together these actions meet the stated access needs without granting team-lead administration. Assigning the team-lead profile violates least privilege and is unnecessary when a suitable analyst profile exists. Hiding controls in an administrator workspace is not a substitute for correct security permissions and does not reliably restrict the user's underlying access.

More Practice Questions

Get the Full Python Institute PCEP-30-02 Dumps as PDF and Practice Test

12 questions are free on this page and the full set has 30. It comes as a PDF and an online practice test, with 90 days of free updates.