135,564 views
4 votes
4 votes
What will be printed to the screen when the following program is run?

What will be printed to the screen when the following program is run?-example-1
User MrKWatkins
by
2.4k points

2 Answers

14 votes
14 votes

Answer:

The answer is 20

Step-by-step explanation:

Hope this helps!

User Hoo
by
3.1k points
26 votes
26 votes

Answer:

40

Step-by-step explanation:

Indexes for arrays in Python start at 0, which means the first item of an array is at index 0, the second item is at index 1, the third item is at index 2, and the fourth item is at index 3.

Therefore when my_list[3] is put inside the print function, the fourth item, 40, is printed to the screen.

Hope this helps!

User Michael Burr
by
2.5k points