
List quiz1
Authored by kidzian pvtltd
Computers
9th - 12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to create a list in Python?
list = "apple", "banana", "cherry"
list = {"apple", "banana", "cherry"}
list = ["apple", "banana", "cherry"]
list = (apple, banana, cherry)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first element in a list?
0
1
2
none
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the last item of a list named fruits?
fruits[-1]
fruits[len(fruits)]
fruits[0]
fruits[last]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of len([10, 20, 30])?
2
3
4
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add an item to the end of a list?
insert()
add()
append()
push()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will list1 = [1, 2] * 3 result in?
[1, 2, 1, 2, 1, 2]
[1, 2, 3]
[3, 6]
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following removes the first matching value in a list?
pop()
remove()
del()
discard()
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?