Practice Free PCEP-30-02 Exam Online Questions
Question #31
What is the output of the following snippet if the user enters two lines containing 3 and 6 respectively?

- A . 333333
- B . 18
- C . 36
- D . 666
Correct Answer: A
Question #32
What is the expected output of the following code?

- A . 1 | 128
2 | 512 - B . 1 | 8
2 | 16 - C . 1 | 32
2 | 1024 - D . 1 | 16
2 | 256
Correct Answer: D
Question #33
The result of the following addition:
123 + 0.0
- A . cannot be evaluated
- B . is equal to 123
- C . is equal to 123.0
Correct Answer: C
Question #34
What is the expected output of the following code?

- A . False
- B . 1
- C . 0
- D . True
Correct Answer: A
Question #35
How many elements does the L list contain?
![]()
- A . one
- B . two
- C . three
- D . zero
Correct Answer: D
Question #36
Take a look at the snippet and choose one of the following statements which is true:

- A . nums and vals are of the same length
- B . nums is longer than vals
- C . vals is longer than nums
Correct Answer: C
Question #37
What is the expected output of the following code?
print(1 / 1)
- A . 1
- B . 1.0
- C . This can not be predicted.
- D . This can not be evaluated.
Correct Answer: B
Question #38
What is the expected output of the following code?
print(‘Mike’ > ‘Mikey’)
- A . False
- B . True
- C . 1
- D . 0
Correct Answer: A
Question #39
You develop a Python application for your company. You have the following code.

Which of the following expressions is equivalent to the expression in the function?
- A . (a + b) * (c – d)
- B . (a + (b * c)) – d)
- C . (a + ((b * c) – d)
- D . None of the above.
Correct Answer: D
Question #40
What is the expected output of the following code?

- A . 1
- B . Peter
- C . None
- D . value
- E . The code is erroneous.
Correct Answer: C
