CodeHS Python Unit 9 Quiz Review
Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Katy Fleming
Used 2+ times
FREE Resource
Enhance your content in a minute
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Given the following list, what will be printed when the following line of code is called?
print(my_list[3][1:])
[7, 8]
[9, 10, 11]
[6, 7, 8]
[10, 11]
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Given the following list, Which line of code would print the number ‘5’ to the screen?
print(my_list[1])
print(my_list[1:2])
print(my_list[1][2])
print(my_list[2][3])
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What kind of data structure is user_data in the following declaration?
user_data = {"name": "TJ", "age":24, "user_name":"artLover123"}
Tuple
List
Dictionary
2D List
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the output of this program?
12 45 1 3 7 2 5 8 3
12 3 5 45 7 8 1 2 3
12 3 5
3 2 1 8 7 45 5 3 12
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following code snippets will create this 2D list?
board = [1, 2, 3] + [4, 5, 6] + [7, 8, 9]
board = [1, 2, 3]
board.append([4, 5, 6])
board.append([7, 8, 9])
board = [1, 2, 3, 4, 5, 6, 7, 8, 9]
board = []
board.append([1, 2, 3])
board.append([4, 5, 6])
board.append([7, 8, 9])
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following list comprehensions will create the same list as the for loop below?
my_list = [i for i in range(6)]
my_list = [i*2 for i in range(6)]
my_list = [i for i*2 in range(6)]
This cannot be done using a list comprehension statement.
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What does “packing” refer to in Python?
Creating a list
Initializing variables using values from a list
Storing multiple variables’ values by putting them in a collection, like a list or tuple
Cramming as many commands as possible onto a single line
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
0 questions
Unit 9
Quiz
•
0 questions
Module review--Data Structures
Quiz
•
0 questions
Unit 9 Test Review
Quiz
•
0 questions
Python Programming Data Structure Quiz
Quiz
•
0 questions
Multi-Dimensional Data Structures
Quiz
•
0 questions
Data Structures
Quiz
•
0 questions
Creating and Altering Data Structure
Quiz
•
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
