exam questions

Exam PCEP-30-02 All Questions

View all questions & answers for the PCEP-30-02 exam

Exam PCEP-30-02 topic 1 question 42 discussion

Actual exam question from Python Institute's PCEP-30-02
Question #: 42
Topic #: 1
[All PCEP-30-02 Questions]

Which of the following sentences are true about the code? (Choose two.)

  • A. nums and vals are different lists
  • B. vals is longer than nums
  • C. nums and vals are different names of the same list
  • D. nums and vals have the same length
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hovnival
2 days, 21 hours ago
Selected Answer: CD
The two true sentences about the code are: C. nums and vals are different names of the same list D. nums and vals have the same length Explanation: When you assign vals = nums, vals becomes a reference to the same list that nums refers to. Therefore, any changes made to the list through either nums or vals will affect the same underlying list. Since vals and nums are references to the same list, they both have the same length.
upvoted 1 times
...
scriptnone
2 months, 1 week ago
Selected Answer: CD
C and D.
upvoted 2 times
...
christostz03
4 months, 1 week ago
correct answers are c & d
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago