PCEP-30-02 Actual Exam Questions

Last updated on Dec. 23, 2024.
Exam Code:PCEP-30-02
Exam Name:PCEP – Certified Entry-Level Python Programmer
Exam Questions:418
 

Topic 1 - Topic 1, Data Aggregates

Question #1 Topic 1

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
Reveal Solution Hide Solution   Discussion   15

Correct Answer: C 🗳️

Question #2 Topic 1

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
Reveal Solution Hide Solution   Discussion   6

Correct Answer: A 🗳️

Question #3 Topic 1

What is the expected output of the following code?

  • A. 2
  • B. 4
  • C. 5
  • D. 3
Reveal Solution Hide Solution   Discussion   5

Correct Answer: B 🗳️

Question #4 Topic 1

What is the expected output of the following code?

  • A. [1, 3]
  • B. [1, 4]
  • C. [4, 3]
  • D. [1, 3, 4]
Reveal Solution Hide Solution   Discussion   6

Correct Answer: C 🗳️

Question #5 Topic 1

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']
Reveal Solution Hide Solution   Discussion   4

Correct Answer: C 🗳️

Question #6 Topic 1

Take a look at the snippet, and choose the true statements: (Choose two.)

  • A. nums is longer than vals
  • B. nums and vals are of the same length
  • C. vals is longer than nums
  • D. nums and vals refer to the same list
Reveal Solution Hide Solution   Discussion   3

Correct Answer: BD 🗳️

Question #7 Topic 1

What is the output of the following snippet?

  • A. 12
  • B. (2, 1)
  • C. (1, 2)
  • D. 21
Reveal Solution Hide Solution   Discussion   4

Correct Answer: D 🗳️

Question #8 Topic 1

What is the expected output of the following code?
print(list('hello'))

  • A. hello
  • B. [h, e, l, l, o]
  • C. ['h', 'e', 'l', 'l', 'o']
  • D. ['h' 'e' 'l' 'l' 'o']
  • E. None of the above.
Reveal Solution Hide Solution   Discussion   12

Correct Answer: C 🗳️

Question #9 Topic 1

What will be the output of the following code snippet?

  • A. [1, 3, 5, 7, 9]
  • B. [8, 9]
  • C. [1, 2, 3]
  • D. [1, 2]
Reveal Solution Hide Solution   Discussion   4

Correct Answer: A 🗳️

Question #10 Topic 1

What will be the output of the following code snippet?

  • A. 3
  • B. 2
  • C. 4
  • D. 1
Reveal Solution Hide Solution   Discussion   5

Correct Answer: C 🗳️

file Viewing page 1 out of 42 pages.
Viewing questions 1-10 out of 418 questions
Next Questions
Browse atleast 50% to increase passing rate cup
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago