
Mastering Python Lists
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
SHERRI OSTERBERG
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet? ```python my_list = [1, 2, 3, 4, 5] print(my_list[2]) ```
1
2
3
4
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you slice a list to get all elements from the second position to the fourth position (inclusive)?
`my_list[1:4]`
`my_list[2:5]`
`my_list[1:5]`
`my_list[2:4]`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of concatenating the following lists? ```python list1 = [1, 2, 3] list2 = [4, 5, 6] result = list1 + list2 ```
`[1, 2, 3, 4, 5, 6]`
`[4, 5, 6, 1, 2, 3]`
`[[1, 2, 3], [4, 5, 6]]`
`[1, 2, 3, [4, 5, 6]]`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method would you use to add an element to the end of a list?
`append()`
`insert()`
`extend()`
`add()`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the element 'cat' from the following list? ```python animals = ['dog', 'cat', 'bird'] ```
`animals.remove('dog')`
`animals.delete('cat')`
`animals.remove('cat')`
`animals.pop(1)`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to sort a list named `numbers` in ascending order?
`numbers.sort(ascending=True)`
`sorted(numbers)`
`numbers.sort()`
`numbers.sorted()`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you find the length of the list `fruits`?
`len(fruits)`
`fruits.len()`
`length(fruits)`
`fruits.length()`
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
10 questions
emtech
Quiz
•
12th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
Contact Center Sevices
Quiz
•
7th - 10th Grade
8 questions
Basic computer
Quiz
•
9th - 12th Grade
10 questions
ICT as Platform for Change
Quiz
•
11th - 12th Grade
10 questions
Hands-on Modul 3
Quiz
•
University
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
