
Understanding Lists in Python
Authored by Vlamir Dias
Computers
12th Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create a list in Python?
`list = (1, 2, 3)`
`list = [1, 2, 3]`
`list = {1, 2, 3}`
`list = <1, 2, 3>`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access the third element in a list named `my_list`?
`my_list[2]`
`my_list[3]`
`my_list[1]`
`my_list[-1]`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following methods is used to add an element to the end of a list in Python?
`list.add()`
`list.append()`
`list.insert()`
`list.extend()`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python my_list = [1, 2, 3] my_list.append(4) print(my_list) ```
`[1, 2, 3]`
`[1, 2, 3, 4]`
`[4, 1, 2, 3]`
`[1, 2, 3, 4, 4]`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the element at index 2 from a list named `my_list`?
`my_list.remove(2)`
`my_list.pop(2)`
`my_list.delete(2)`
`my_list.clear(2)`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of the following code? ```python my_list = [10, 20, 30, 40] print(my_list[1:3]) ```
`[10, 20, 30]`
`[20, 30]`
`[20, 30, 40]`
`[30, 40]`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will create a list of numbers from 0 to 9?
`list(range(0, 10))`
`list(range(1, 10))`
`list(range(0, 9))`
`list(range(1, 9))`
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
Impresa e siti web
Quiz
•
8th - 12th Grade
10 questions
IT Quiz
Quiz
•
11th - 12th Grade
13 questions
INTERNET CONNECTION
Quiz
•
12th Grade
20 questions
Tin học 11 chương I
Quiz
•
1st - 12th Grade
14 questions
[Lớp 12] Access - Ôn tập
Quiz
•
12th Grade
15 questions
Virtual Private Server
Quiz
•
12th Grade
10 questions
Pengenalan Perwakilan Data
Quiz
•
12th Grade
10 questions
Python with DataScience
Quiz
•
7th Grade - 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