
List Methods Quiz
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Medium
Nisreen Ariwala
Used 1+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the count() method do in a list?
Returns the index of the first occurrence of an element
Returns the number of times a given element appears in the list
Removes the first occurrence of an element from the list
Reverses the order of elements in the list
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you call index() on an element not in the list?
It will return -1
It will return None
It will remove the element from the list
It will generate a ValueError
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the remove() method do?
Reverses the list
Removes all occurrences of an element
Removes the last element of the list
Removes the first occurrence of a specified element
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the pop() method return if no index is specified?
The middle element of the list
The first element of the list
The last element of the list
None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of calling reverse() on the list ['Tiger', 'Zebra', 'Lion']?
['Tiger', 'Lion', 'Zebra']
['Lion', 'Tiger', 'Zebra']
['Lion', 'Zebra', 'Tiger']
['Zebra', 'Tiger', 'Lion']
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the list look like after executing list1.remove(30) on list1 = [10, 20, 30, 40, 50, 30]?
[10, 20, 40, 50, 30]
[10, 20, 30, 50]
[10, 20, 30, 40, 50, 30]
[10, 20, 30, 40, 50]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the sort() method do?
Sorts the elements of the list in place
Returns a sorted copy of the list
Reverses the order of elements in the list
Removes duplicates from the list
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
Powerpoint Presentation Interface Quiz
Quiz
•
11th Grade
10 questions
Khởi động
Quiz
•
9th - 12th Grade
13 questions
Kuis Animasi 3D - 3
Quiz
•
11th Grade
10 questions
Introduction To Java: Hello World
Quiz
•
7th - 12th Grade
10 questions
[ APJII ] Training FTTH - Fiber to the Home
Quiz
•
KG - University
10 questions
Sprawdź się
Quiz
•
4th - 12th Grade
10 questions
Empowerment Technologies
Quiz
•
11th Grade
10 questions
STM BTEC DIT 3- 5. Maintenance, set-up, performance p152
Quiz
•
9th - 11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
