Python Institute PCEP-30-02 Exam Questions
PCEP - Certified Entry-Level Python Programmer (Page 14 )

Updated On: 5-Mar-2026

What code would you insert instead of the comment to obtain the expected output?
Expected output:

Code:

  1. print(k[0])
  2. print(k)
  3. print(k['0'])
  4. print(k["0"])

Answer(s): A



What is the expected output of the following code?

  1. 1 5 9 13
  2. 1 2 3 4
  3. 13 14 15 16
  4. 4 8 12 16

Answer(s): D



What is the expected output of the following code?

  1. The code is erroneous.
  2. 2
  3. 1
  4. 0

Answer(s): A



What is the expected output of the following code?

  1. [2]
  2. [3, 4, 5]
  3. The program will cause an error.
  4. [2, 3, 4, 5]

Answer(s): B



You develop a Python application for your company.
A list named employees contains 200 employee names, the last five being company management. You need to slice the list to display all employees excluding management.
Which code segments can you use? (Choose two.)

  1. employees[1:-5]
  2. employees[0:-5]
  3. employees[:-5]
  4. employees[0:-4]
  5. employees[1:-4]

Answer(s): B,C



Viewing page 14 of 79
Viewing questions 66 - 70 out of 481 questions



Post your Comments and Discuss Python Institute PCEP-30-02 exam dumps with other Community members:

PCEP-30-02 Exam Discussions & Posts

AI Tutor