Short Answer
1. Look at the following statement:
numbers = [10, 20, 30, 40, 50]
a. How many elements does the list have?
b. What is the index of the first element in the list?
c. What is the index of the last element in the list?
2. Look at the following statement:
numbers = [1, 2, 3]
a. What value is stored in numbers [2]?
b. What value is stored in numbers [0]?
c. What value is stored in numbers [-1]?
3. What will the following code display?
values = [2, 4, 6, 8, 10]
print (values [1:3])
4. What does the following code display?
numbers = [1, 2, 3, 4, 5, 6, 7]
print(numbers [5:])
5. What does the following code display?
numbers = [1, 2, 3, 4, 5, 6, 7, 8]
print (numbers [-4:])
6. What does the following code display?
values = [2] * 5
print (values)