PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 83


What is the expected behavior of the following code?

Show Answer
Correct Answer: C

C

Discussion

3 comments
Sign in to comment
James_111Option: C
Jul 10, 2022

C: outputs list assignment index out of range. This is because my_list = [1, 2, 3] (# is positioned as 0,1,2) so having a [3] would need the list to me longer my_list=[1, 2, 3, 4]

macxszOption: C
May 3, 2022

C. it outputs list assignment index out of range

Dav023Option: C
Sep 26, 2022

list assignment index out of range