![](/blog/images/pceppracticequestions.jpg)
PCEP Free Practice Questions
The PCEP (Certified Entry-Level Python Programmer) certification is a recognized qualification that demonstrates an individual's understanding of fundamental computer programming concepts, such as data types, functions, and loops, as well as their proficiency in using the Python programming language. It is considered a useful credential for those seeking entry-level programming positions.
To obtain the PCEP certification, candidates must pass the PCEP-30-02 exam, which assesses their ability to complete coding tasks related to the basics of programming in Python. This includes a demonstration of knowledge on common computer programming concepts, familiarity with the syntax and semantics of Python, and the ability to solve common challenges using the Python Standard Library.
The following PCEP-30-02 questions are taken from PCEP Practice Tests in MyExamCloud's Study Plan. You can access a free PCEP (PCEP-30-02) Practice Mock Exam from their PCEP Practice Tests Study Plan and also find brief explanations for each question.
Topic:Section 1: Common Programming and Python Fundamentals
QUESTION: 1
Which of the following statements are true about python functions?
A:Python functions strongly demand the presence of return type.
B:Python functions strongly demand the presence of a pair of parentheses.
C:Python functions strongly demand the presence of return statements.
ANSWER: Choice B
Topic:Section 1: Common Programming and Python Fundamentals
QUESTION: 2
What is the output of the following code?
print('PCEP')
print()
print('PCAP')
print()
print('PCPP1')
A:PCEP PCAP PCPP1
B:PCEP
PCAP
PCPP1
C:PCEP
PCAP
PCPP1
ANSWER: Choice B
Topic:Section 1: Common Programming and Python Fundamentals
QUESTION: 3
What is the result of the following code?
while true:
print('MyExamCloud')
A:The program raise NameError
B:Print an infinite MyExamCloud
C:Print a single MyExamCloud
D:The program display SyntaxError
ANSWER: Choice A
Topic:Section 1: Common Programming and Python Fundamentals
QUESTION: 4
What is the output of the following code?
# print("MyExamCloud")
print("MyExamCloud")
A:MyExamCloud
MyExamCloud
B:MyExamCloudMyExamCloud
C:MyExamCloud
ANSWER: Choice C
Topic:Section 4: Functions and Exceptions
QUESTION: 5
What is the output of the following code?
def afunc(name):
print("Welcome", name)
name = 'John'
afunc('Peter')
print(name)
A:John
John
B:Welcome Peter
Welcome Peter
C:Error
D:Welcome Peter
John
ANSWER: Choice D
Topic:Section 4: Functions and Exceptions
QUESTION: 6
What is the value of the obj in the below snippet?
def fun():
return
obj = fun()
A:Error
B:fun
C:fun:None
D:None
ANSWER: Choice D
Topic:Section 4: Functions and Exceptions
QUESTION: 7
What is the output of the following code?
name = 'John'
def scope_test():
print(name)
global x
x = 123
scope_test()
print(x)
A:John
123
B:John
NameError
C:John
SyntaxError
D:John
TypeError
ANSWER: Choice A
Topic:Section 4: Functions and Exceptions
QUESTION: 8
Which code snippet raises the exception named OrderException
?
A:throws OrderException
B:throw OrderException
C:raise OrderException
D:raises OrderException
ANSWER: Choice C
Topic:Section 4: Functions and Exceptions
QUESTION: 9
What is the immediate super class of KeyboardInterrupt?
A:InputException
B:Exception
C:BaseException
D:UserException
ANSWER: Choice C
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 10
What is the output of the following code?
print("My Exam\nCloud".split())
print("".join("My Exam\nCloud".split()))
A:['My', 'Exam']
My Exam\nCloud
B:['My', 'Exam', 'Cloud']
MyExamCloud
C:['My', 'Exam', '\nCloud']
My Exam \nCloud
D:['My', 'Exam\nCloud']
My Exam
Cloud
ANSWER: Choice B
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 11
Code Given:
s1 = 'My Exam Cloud PCAP Practice Tests'
s2 = s1.split()
print(s2[-2])
What is the output?
A:Exam
B:My
C:PCAP
D:Practice
E:Tests
F:None
G:Cloud
ANSWER: Choice D
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 12
What is the output of the following code?
p_list = [
'PCEP',
'PCAP'
'PCPP1'
]
print(p_list)
A:['PCEP', 'PCAPPCPP1']
B:SyntaxError: invalid syntax
C:['PCEP', 'PCAP', 'PCPP1']
D:['PCEP']
ANSWER: Choice A
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 13
What is the output of the following code?
str = """ """
print(len(str));
A:5
B:Error
C:2
D:1
ANSWER: Choice D
Topic:Section 2: Control Flow - Conditional Blocks and Loops
QUESTION: 14
What is the output of the following code?
for i in range(-1, 1): print('MyExamCloud', end='')
A:ValueError: range() arg 1 must be greater than zero
B:MyExamCloudMyExamCloudMyExamCloud
C:MyExamCloudMyExamCloud
D:MyExamCloud
ANSWER: Choice C
Topic:Section 2: Control Flow - Conditional Blocks and Loops
QUESTION: 15
What is the output of the following code?
for ch in "Python Programming Course from MyExamCloud.com":
if ch == ".":
break
print(ch, end="")
A:Python Programming Course from MyExamCloud.
B:com
C:Python Programming Course from MyExamCloud
D:.com
ANSWER: Choice C
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 16
What is the output of the following code?
list = [1, 2, 3, 4]
list.append(5)
list.insert(0, 'MyExamCloud')
print(list)
A:Error
B:[1, 2, 3, 4]
C:['MyExamCloud', 1, 2, 3, 4, 5]
D:['MyExamCloud', 1, 2, 3, 4]
E:[1, 2, 3, 4, 5]
ANSWER: Choice C
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 17
Which method removes all dictionary items?
A:dictionary.clear()
B:dictionary.remove()
C:dictionary.delete()
ANSWER: Choice A
Topic:Section 3: Data Collections - Tubles, Dictionaries, Lists and Strings
QUESTION: 18
Given the following dictionary, which code can add Zip as 10001?
dictionary = {"name": "John", "state": "NY", "country": "USA"}
A:dictionary["Zip"] = "10001"
B:dictionary.update({"Zip": "10001"})
C:dictionary[0] = "Zip:10001"
D:dictionary[0] = ("Zip": "10001")
ANSWER: Choice A,Choice B
Author | JEE Ganesh | |
Published | 3 months ago | |
Category: | Python Certification | |
HashTags | #Java #PythonCertification |