Questions: Arrays and Lists

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

Given a = [10, 20, 30, 40], what is the value of a[-2]?

A10
B20
C30
D40
Question 2 True / False

After executing b = a (where a is the list [1, 2, 3]), the statement b[0] = 99 will also change a[0] to 99.

TTrue
FFalse
Question 3 Short Answer

Describe the accumulation pattern for building a list of the squares of the integers 1 through 5 using a for loop.

Think about your answer, then reveal below.