WorksheetsList MCQ
Total questions: 21
Worksheet time: 11mins
What will tickets[1:4] return?
[100, 105, 110, 115]
[105, 110, 115]
[110, 115, 120]
[105, 110]
What does tickets[::-1] do?
Sort the list
Reverse the list
Rotate the list
Duplicate the list
What is the output of sum(tickets)?
550
560
540
600
What does min(tickets) return?
120
100
105
115
What is the value of max(tickets)?
115
120
100
After tickets.append(125), what is the last element?
120
115
100
125
What is the effect of tickets.extend([130, 135])?
Adds two new lists
Replaces old list
Adds elements 130 and 135 to the end
Removes last two values
What will tickets.remove(105) do?
Remove value at index 105
Remove the first occurrence of 105
Remove the last element
Remove all values smaller than 105
What does tickets.pop() do?
Removes first element
Removes and returns last element
Deletes entire list
Removes element 120
10. What will tickets[2] return?
The value at index 2 of the tickets array
The length of the tickets array
An error message
The first element of the tickets array
What is the result of tickets[:3]?
A. [100, 105, 110]
B. [100, 105]
C. [110, 115, 120]
D. [115, 120]
If tickets.append(200) is used, list length becomes?
4
5
6
7
Which operation removes by index?
remove()
append()
extend()
pop()
What is returned by tickets.pop(1)?
105
100
115
120
Which method adds multiple values at once?
append()
remove()
extend()
pop()
What will tickets[-1] return?
100
115
120
Index error
What happens if tickets.remove(500) is executed?
500 is removed
List becomes empty
No change
Error occurs
Which of the following reverses a list?
tickets[::-1]
tickets.reverse()
Both A and B
None
What is len(tickets)?
Number of list items
Sum of list items
Last index
Which option is correct?
Minimum value
Average value
Median value
Maximum value
To add 300 at index 1, which is correct?
tickets.add(1, 300)
tickets.insert(1, 300)
tickets.append(1, 300)
tickets.push(300)
