
List and Tuple Questions
Quiz
•
Information Technology (IT)
•
8th Grade
•
Hard
Ashley Brown
Used 54+ times
FREE Resource
Student preview

20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following attempt to initialize a list? data = ["hockey", 4, False]
You should be using parentheses ( ) to surround the items in a list
"data" is not a valid variable name
You can't mix different types of data in a single list
Nothing; this will work correctly
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be displayed on the screen when the following code is run? esports = ["Donkey Kong", "Galaga", "Pac Man"] print( esports[1] )
Donkey Kong
Galaga
Pac Man
Syntax error; you can't access individual list items this way
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following code? esports = ("Donkey Kong", "Galaga", "Pac Man") esports[1] = "Centipede"
You cannot update an item in a tuple
The item at index 1 does not exist
The [1] notation after the variable name is not valid
Nothing; this will work fine
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given a list with 3 items, what is the lowest and highest valid index number into that list?
0 and 2
1 and 3
0 and 3
1 and 2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given a list named "esports", which of the following statements will access only the first and second items in that list?
esports(0:1)
esports{0:2]
esports(1,2)
esports.range(0,2)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed on the output screen when the following code runs? esports = ("Donkey Kong", "Galaga", "Pac Man") print(len(esports))
3
('Donkey Kong', 'Galaga', 'Pac Man')
esports
Error; the len() function will not work on a tuple
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.insert(0,"Centipede") print(esports)
['Centipede', 'Galaga', 'Pac Man']
['Donkey Kong', 'Galaga', 'Pac Man', 'Centipede']
['Centipede', 'Donkey Kong', 'Galaga', 'Pac Man']
['Centipede', 'Centipede', 'Centipede']
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
20 questions
Figurative Language Review
Quiz
•
8th Grade
4 questions
End-of-month reflection
Quiz
•
6th - 8th Grade
20 questions
Distribute and Combine Like Terms
Quiz
•
7th - 9th Grade
20 questions
Physical and Chemical Changes
Quiz
•
8th Grade
22 questions
Newton's Laws of Motion
Lesson
•
8th Grade