What is the expected output of the following code? x = 1 + 1 // 2 + 1 / 2 + 2 print(x)
- A. 3
- B. 4.0
- C. 4
- D. 3.5
Free PCEP-30-02 sample questions for the PCEP – Certified Entry-Level Python Programmer exam. No account required: study at your own pace.
Want an interactive quiz? Take the full PCEP-30-02 practice testLooking for more? Click here to get the full PDF with 47+ practice questions for $10 for offline study and deeper preparation.
What is the expected output of the following code? x = 1 + 1 // 2 + 1 / 2 + 2 print(x)
The result of the following addition: 123 + 0.0
The fact that tuples belong to sequence types means:
What is the expected output of the following code? print(2 ** 3 ** 2 ** 1)
The following statement ... assert x == 0
A variable defined outside a function:
What is the expected output of the following code? print(chr(ord('z') - 2))
What is the expected output of the following code? print('x', 'y', 'z', sep='sep')
If you want to build a string that reads: Peter's sister's name's "Anna" Which of the following literals would you use? (Choose two.)
What is the expected output of the following code? print(1 // 2 * 3)
What is the expected output of the following code? menu = {“bunuelo”: 3.21, “torrijas”: 4.99, “churros”: 1.99} for value in menu.values(): print (str(value) [1], end “”)
A data structure described as LIFO is actually a:
Which of the following function calls can be used to invoke the below function definition? (Choose three.) def test(a, b, c, d):
What is the expected output of the following code? x = 1 / 2 + 3 // 3 + 4 ** 2 print(x)
The following code: print(float("1, 3"))
Download the complete PCEP-30-02 study bundle with 47+ questions in a single printable PDF.