Free PCEP Practice Test for Certified Entry-Level Python Programmer (PCEP-30-02)
The PCEP-30-02 certification, or the PCEP – Certified Entry-Level Python Programmer exam, is an entry-level certification for individuals who want to demonstrate their knowledge of Python programming fundamentals. It is ideal for those starting their Python programming journey and is recognized globally as a stepping stone to a career in software development.
Key Topics Covered in the PCEP-30-02 Exam:
Python Syntax and Semantics:
- Understanding basic Python syntax, indentation, and structure.
- Writing and interpreting Python statements and expressions.
Data Types and Variables:
- Working with basic data types such as integers, floats, strings, and booleans.
- Variable declaration, type conversion, and basic operators.
Control Flow:
- Understanding conditional statements (
if
,else
,elif
). - Working with loops (
for
,while
).
- Understanding conditional statements (
Functions:
- Defining and calling functions.
- Function parameters, return values, and scope.
Data Structures:
- Using lists, tuples, sets, and dictionaries to store and manipulate data.
Error Handling:
- Using try-except blocks to handle exceptions and errors.
Exam Details:
- Duration: The exam is typically 45 minutes long.
- Format: Multiple-choice questions.
- Passing Score: Generally around 70%.
- Cost: Varies by location, but usually around $59 USD.
Why PCEP?
- Industry Recognition: A widely recognized certification for Python developers.
- Beginner-Friendly: Suitable for those with no formal programming background.
- Job Readiness: Provides foundational knowledge to help you secure entry-level programming roles.
Questions
- What will be the output after running the following code?
A. 15
B. 5
C. 10
D. 20
- What will be the output after running the following code?
A. ['apple', 'banana', 'cherry']
B. ['apple', 'grapes', 'cherry']
C. ['grapes', 'banana', 'cherry']
D. ['apple', 'banana', 'grapes']
- What will be the output after running the following code?
A. 8
B. 27
C. 64
D. 216
- What will be the output after running the following code?
A. 0 0 0 1 1 0 1 1
B. 0 0 1 0 0 1 1 1
C. 1 0 1 1
D. 0 1 1 0 1 1
- What does the following code do?
A. 2
B. 1
C. 4
D. 5
- What will be the output after running the following code?
A. 3.0
B. 3
C. TypeError
D. 1.2
- What will be the output after running the following code?
A. 7hi
B. 3hi
C. hi3
D. 5hi
Mark the correct sentences about the continue statement in a loop (check all that apply): A. Continue statement alters the flow of the loop
B. Continue will terminate the current iteration and move to the next one
C. Continue will terminate the entire loop
D. Continue statement in an inner loop will only affect the inner loopWhat will be the output after running the following code?
A. Value of i : i
B. Value of i : 6
C. 6
D. SyntaxError
- What will be the output after running the following code?
A. 0b1100
B. 0b1111
C. 0b1001
D. 0b1000
- What will be the output after running the following code?
A. ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday']
B. ['Monday', 'Tuesday', 'Wednesday', 'Sunday', 'Thursday']
C. ['Sunday', 'Tuesday', 'Wednesday', 'Thursday']
D. ['Sunday', 'Monday', 'Tuesday', 'Wednesday']
- What is the output of the code below:
A. 70 70
B. 70 50
C. 50 70
D. 50 50
- What will be the output after running the following code?
A. Earth
B. Earth Mars
C. 3
D. 3 True
- What will be the output after the following code is executed?
A. Good-Morning
B. Good Morning
C. GoodNoneMorning
D. Good,Morning
- What will be the output after running the following code?
A. ((2, 3, 4), ('mango', 'apple'))
B. (2, 3, 4, 'mango', 'apple')
C. (2, 3, 4)('mango', 'apple')
D. ('mango', 'apple', (2, 3, 4))
- What will be the output after running the following code?
A. 2
B. 0.4
C. SyntaxError
D. 2.5
- What will be the output after running the following code?
A. Fixed
B. Temp
C. error
D. Infinite loop
- What is the output of this code when 'Alice' and 25 are entered by the user and stored in variables name and age, respectively?
A. Alice <class 'int'>
B. Alice 25(int)
C. Alice 25
D. SyntaxError
- What will be the output after running the following code?
A. 2 3 4
B. 3 4 5
C. 2 3 4 4
D. 2 3 4 5
- What will be the output after the following code is executed?
A. not True
B. False
C. not False
D. True
- What will be the output after running the following code?
A. [1, 'Python', 'days', ['Monday', 'Friday']]
B. {1: 'Python', 'days': ['Monday', 'Friday']}
C. IndexError
D. {1: 'Python', 'days': ['Monday', 'Friday']}
- What will be the output of the following code?
A. A blank space
B. error
C. A blank line
D. Nothing is printed
Answers
- A. 15
- B. ['apple', 'grapes', 'cherry']
- A. 8
- D. 0 1 1 0 1 1
- A. 2
- A. 3.0
- C. hi3
- A. Continue statement alters the flow of the loop
- B. Value of i : 6
- C. 0b1001
- A. ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday']
- A. 70 70
- A. Earth
- A. Good-Morning
- A. ((2, 3, 4), ('mango', 'apple'))
- C. SyntaxError
- D. Infinite loop
- C. Alice 25
- A. 2 3 4
- C. not False
- B. {1: 'Python', 'days': ['Monday', 'Friday']}
- C. A blank line