Super Sale | Extra 20% Flat Off - Ends In Coupon code: GDAY20

Python Institute PCEP-30-02

Page:    1 / 36   
Total 180 questions | Updated On: Apr 23, 2024
Question 1

What will be the output of the following code?
def get_number():
    for i in []:
        yield i
 
print(next(get_number()))


Answer: B
Question 2

What will be the output of the following code?
def first(x):
        return x ** x
 
def second(x):
        return first(x) + first(x)
 
print(second(3))


Answer: A
Question 3

What happens when the user runs the following code?

 


Answer: D
Question 4

Which statements are true about the following function definition?
def my_func(x=1):
return x


Answer: B,D
Question 5

What will be the output of the following code?
def boo(x):
if x == 1:
return x
return x * boo(x-1)
 
print(boo(3))


Answer: B
Page:    1 / 36   
Total 180 questions | Updated On: Apr 23, 2024

Quickly grab our PCEP-30-02 product now and kickstart your exam preparation today!

Name: Certified Entry-Level Python Programmer
Exam Code: PCEP-30-02
Certification: PCEP
Vendor: Python Institute
Total Questions: 180
Last Updated: Apr 23, 2024