
Mastering Python Lists

Quiz
•
Computers
•
10th Grade
•
Hard
SHERRI OSTERBERG
FREE Resource
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()`
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Data Structures Activity - 1

Quiz
•
University
12 questions
Array

Quiz
•
University
15 questions
Computer Science Quiz: Application of Computational Thinking

Quiz
•
10th Grade
15 questions
Queues

Quiz
•
11th Grade - Professi...
10 questions
AP CS A Unit 7 Quiz PRACTICE

Quiz
•
9th - 12th Grade
12 questions
GCSE Computing Flash Quiz

Quiz
•
10th - 11th Grade
13 questions
python advance

Quiz
•
10th Grade
11 questions
Python Code Quiz

Quiz
•
8th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade