exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 738 discussion

Actual exam question from Cisco's 350-401
Question #: 738
Topic #: 1
[All 350-401 Questions]

Refer to the exhibit.



What is the value of the variable list after the code is run?

  • A. [1, 2, 10]
  • B. [1, 2, 3, 10]
  • C. [1, 2, 10, 4]
  • D. [1, 10,10,10]
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Vlad_Is_Love_ua
Highly Voted 2 years, 2 months ago
Selected Answer: B
After the code is run, the value of the variable list will be [1, 2, 3, 10]. The code creates a list containing the values [1, 2, 3, 4]. Then, it modifies the fourth element of the list (which has an index of 3, since Python uses 0-indexing) by setting it equal to 10 using the assignment operator (=). Finally, it prints the resulting list using the print() function. So, the output of the print statement will be [1, 2, 3, 10], indicating that the fourth element of the list has been successfully modified.
upvoted 16 times
...
makarov_vg
Highly Voted 2 years, 3 months ago
https://www.programiz.com/python-programming/online-compiler/ list = [1, 2, 3, 4] list[3] = 10 print(list) Answer B
upvoted 8 times
bullett00th
2 years, 2 months ago
Anser B Thanks for the Link. The result is [1, 2, 3, 10]
upvoted 2 times
...
rsmachado
2 years, 3 months ago
Thanks for the link. It clearly gives the right answer which is B.
upvoted 2 times
...
...
Zeruz
Most Recent 8 months ago
Selected Answer: B
Just remember: Python uses 0 indexing.
upvoted 2 times
...
[Removed]
11 months, 3 weeks ago
Selected Answer: B
B is correct
upvoted 1 times
...
[Removed]
1 year ago
B is correct
upvoted 2 times
...
slacker_at_work
1 year, 3 months ago
Selected Answer: B
The computer says: [1, 2, 3, 10] So B it is
upvoted 2 times
...
Haidary
1 year, 3 months ago
Ansewer is B When we say 3 it start from 0 (0,1,2,3). Now if we compare it with (1,2,3,4) the number 4 should be change to 10. As result we have (1,2,3,10)
upvoted 1 times
...
Tadese
1 year, 5 months ago
Selected Answer: B
Test on python list = [1, 2, 3, 4] list[3] = 10 print(list) [1, 2, 3, 10]
upvoted 1 times
...
Asombrosso
1 year, 9 months ago
Selected Answer: B
starts fr. 0
upvoted 1 times
...
Wissammawas
1 year, 10 months ago
Selected Answer: B
Answer B
upvoted 1 times
...
net_eng10021
2 years ago
B is answer... pytcharm python console output... list=[1,2,3,4] list[3]=10 print(list) [1, 2, 3, 10]
upvoted 1 times
...
ClPo
2 years, 1 month ago
Selected Answer: B
Even if an expert doesn't know python, running the code will show that it's B. Python list index starts at 0.
upvoted 1 times
...
Shansab
2 years, 2 months ago
Selected Answer: B
B. [1, 2, 3, 10] is correct.
upvoted 1 times
...
rsmachado
2 years, 3 months ago
Selected Answer: B
Answer B
upvoted 1 times
...
Nickplayany
2 years, 3 months ago
Selected Answer: B
1,2,3,10
upvoted 1 times
...
Symirnian
2 years, 3 months ago
B. [1, 2, 3, 10] I think.
upvoted 3 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 ...