Practice Free PCEP-30-02 Exam Online Questions
Question #11
What is the expected output of the following code?

- A . 4
- B . The code is erroneous.
- C . 2
- D . 1
Correct Answer: C
Question #12
Take a look at the snippet and choose one of the following statements which is true:

- A . vals is longer than nums
- B . nums and vals are of the same length
- C . nums is longer than vals
Correct Answer: B
Question #13
What is the expected output of the following code?

- A . (1, 2)
- B . The code is erroneous.
- C . {‘a’:1, ‘b’:2}
- D . [1,2]
Correct Answer: B
Question #14
The following code reads two numbers.
Which of the following is the correct input for the code?

- A . 3,4
- B . 34
- C . None of the above.
- D . <pre>3 4</pre>
Correct Answer: C
Question #15
What is the expected output of the following code?
![]()
- A . {(2, 3): 2}
- B . {(1, 2): 1}
- C . The code is erroneous.
- D . 1
Correct Answer: D
Question #16
A way of passing arguments in which the order of the arguments determines the initial parameter’s values is referred to as:
- A . positional
- B . sequential
- C . ordered
Correct Answer: A
Question #17
Which of the following is the correct order of operator precedence?
- A . Exponents –
Unary positive, negative, not –
Parentheses –
Multiplication and Division –
Addition and Subtraction –
And - B . Parentheses –
Exponents –
Unary positive, negative, not –
Addition and Subtraction –
Multiplication and Division –
And - C . Parentheses –
Exponents –
Unary positive, negative, not –
Multiplication and Division –
Addition and Subtraction –
And - D . Exponents –
Unary positive, negative, not –
Multiplication and Division –
Addition and Subtraction –
And –
Parentheses
Correct Answer: C
Question #18
Which of the following items are present in the function header?
- A . function name
- B . return value
- C . parameter list
- D . function name and parameter list
Correct Answer: D
Question #19
How many stars will the following snippet print to the monitor?

- A . three
- B . zero
- C . one
- D . two
Correct Answer: C
Question #20
What is the expected output of the following code?

- A . The code is erroneous.
- B . TRUE
- C . FALSE
- D . None of the above.
Correct Answer: B
