Free Practice Python Institute PCEP-30-02 Exam Questions 2025

Stay ahead with 100% Free Certified Entry-Level Python Programmer PCEP-30-02 Dumps Practice Questions

Page:    1 / 114      
Total 569 Questions | Updated On: Jun 03, 2025
Add To Cart
Question 1

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


Answer: B,D
Question 2

What will be the output of the following code?
def func(a):
global x
b = x + a
return b
x = 2
print(func(4))


Answer: C
Question 3

What will be the output when the user provides the number 6?
num = int(input('give a number: '))
if num > 2:
    if num < 5:
        print('A')
    else:
        print('B')
else:
    print('C')


Answer: A
Question 4

What will be the output of the following code?
x = [
    'a',
    'b',
    {
        'one': 1,
        'two':
        {
            'x' : 10,
            'y' : 20,
            'z' : 30
        },
        'three': 3
    },
    'c',
    'd'
]
print(30 in x[2])


Answer: D
Question 5

What will be the output of the following code?
for a in range(1, 3):
for b in range(1, 3):
if a > b:
continue
else:
print(a * b)


Answer: C
Page:    1 / 114      
Total 569 Questions | Updated On: Jun 03, 2025
Add To Cart

© Copyrights TheExamsLab 2025. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the TheExamsLab.