Font size
WorksheetsPython L1 Quiz 4: Lists
Total questions: 10
Worksheet time: 28mins
True or False: The index 1 identifies the first element in a list.
True
False
True or False: Lists can only contain integers.
True
False
What will always be the index of the last item in a list?
(You may select multiple answers)
-0
-1
0
The size of the list minus 1
Which code will print cat?
(You may select multiple answers)
print(my_list[1])
print(my_list[2])
print(my_list[-2])
print(my_list[-3])
Which index will get the first item in a list?
(You may select multiple answers)
0
1
the size of the list, as a negative number
-1
What is the output of the following code?
arr = [10, 20, 30, 40, 50, 60]
print(len(arr))ㅤㅤㅤㅤㅤㅤ
0
6
5
SyntaxError
What is the output of the following code?
value = [[10, 20, 30], [40, 50, 60]]
print(len(value))ㅤㅤㅤㅤㅤㅤㅤ
2
3
6
0
What is the output of the following code?
value = [[10, 20, 30], [40, 50, 60]]
print(len(value[0]))ㅤㅤㅤㅤㅤㅤ
2
3
6
0
Which function will add an item to a list?
my_list.add(item)
my_list.append(item)
my_list.concat(item)
my_list.insert(item)
Which function will delete an item from a list?
my_list.remove(item)
my_list.delete(item)
my_list.del(item)
my_list.remv(item)
