
Chapter 6- Lists and Loops
Authored by Sarbagya Malla
Computers
9th Grade
Used 40+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 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
Nothing, this will work correctly
The "=" sign
You cant have a list with different data types
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] )
Syntax error; you can't access individual list items this way
Pac Man
Donkey Kong
Galaga
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following code?
esports = ("Donkey Kong", "Galaga", "Pac Man")
esports[1] = "Centipede"
The [1] notation after the variable name is not valid
Nothing; this will work fine
You cannot update an item in a tuple ( Tuples are surrounded by "(" and ")"
The item at index 1 does not exist
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?
1 and 2
0 and 2
1 and 3
0 and 3
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(1:2)
esports(0:3)
esports[0:2]
esports(0:1)
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']
['Centipede', 'Centipede', 'Centipede']
['Centipede', 'Donkey Kong', 'Galaga', 'Pac Man']
['Donkey Kong', 'Galaga', 'Pac Man', 'Centipede']
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
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade