213k views
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 Matia
by
5.5k points

2 Answers

13 votes

Answer:

The answer is 20

Step-by-step explanation:

Hope this helps!

User Fabien Barbier
by
5.4k points
9 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 Konrad Nowicki
by
5.9k points