Python Institute PCEP-30-02 - PCEP - Certified Entry-Level Python Programmer Exam

Page:    1 / 78   
Total 390 questions

Insert the correct snippet so that the program produces the expected output.
Expected output:

Code:

  • A. b = 0 not in list
  • B. b = list[0]
  • C. b = 0 in list
  • D. b = False


Answer : C

Assuming that the tuple is a correctly created tuple, the fact that tuples are immutable means that the following instruction:

  • A. is illegal
  • B. may be illegal if the tuple contains strings
  • C. can be executed if and only if the tuple contains at least two elements
  • D. is fully correct


Answer : A

What is the expected output of the following code?

  • A. 2
  • B. 4
  • C. 5
  • D. 3


Answer : B

What is the expected output of the following code?

  • A. [1, 3]
  • B. [1, 4]
  • C. [4, 3]
  • D. [1, 3, 4]


Answer : C

What is the expected output of the following code?

  • A. ['Peter', 404, 3.03, 'Wellert', 33.3]
  • B. None of the above.
  • C. [404, 3.03]
  • D. ['Peter', 'Wellert']


Answer : C

Page:    1 / 78   
Total 390 questions