17+ practice questions focused on Computer Programming and Python Fundamentals — one of the most tested topics on the Certified Entry-Level Python Programmer PCEP exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Computer Programming and Python Fundamentals PracticeA developer writes a script that prompts the user for their age and stores it in a variable. Which code snippet correctly converts the input to an integer?
Explanation: Option B is correct because it uses the `int()` function to convert the string returned by `input()` into an integer. The `input()` function always returns a string, so wrapping it with `int()` performs the type conversion needed for numeric operations.
Which of the following is the correct way to define a function that takes no arguments and returns the value 42?
Explanation: Option D is correct because in Python, a function is defined using the `def` keyword, followed by the function name, parentheses (even for no arguments), a colon, and the body with `return 42`. This syntax is required by the Python language specification.
A program uses a variable named 'list' that shadows the built-in list type. Later, the code tries to create a new list using list([1,2,3]) but gets a TypeError. What is the most likely cause?
Explanation: When a variable named 'list' is assigned a value (e.g., an integer), it shadows the built-in `list` type in the current scope. Later, calling `list([1,2,3])` attempts to call the variable `list` as a function, but since it now holds a non-callable object (like an integer), Python raises a TypeError. This is a classic name-shadowing issue in Python.
A programmer writes: x = 5; y = 2; result = x / y. What is the type of result?
Explanation: In Python 3, the division operator (/) always returns a floating-point number, even if both operands are integers. Since x and y are both integers (5 and 2), the result of 5 / 2 is 2.5, which is of type float. Therefore, option B is correct.
Given the code: a = [1, 2, 3]; b = a; b.append(4). What is the value of a?
Explanation: Option A is correct because in Python, variables hold references to objects, not copies. When `b = a` is executed, both `a` and `b` point to the same list object in memory. The `append()` method modifies the list in-place, so the change is visible through both references. Thus, `a` becomes `[1, 2, 3, 4]`.
+12 more Computer Programming and Python Fundamentals questions available
Practice all Computer Programming and Python Fundamentals questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Computer Programming and Python Fundamentals. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Computer Programming and Python Fundamentals questions on the PCEP frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Computer Programming and Python Fundamentals is tested as part of the Certified Entry-Level Python Programmer PCEP blueprint. Practicing with targeted Computer Programming and Python Fundamentals questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free PCEP practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Computer Programming and Python Fundamentals is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Computer Programming and Python Fundamentals practice session with instant scoring and detailed explanations.
Start Computer Programming and Python Fundamentals Practice →