
CSP CodeHS U8 8.2 & 8.2
Authored by Thomas Martinez
Computers
8th - 10th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
23 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
2 mins • 5 pts
The following code snippet processes a list of strings with a loop and conditionals:
The code relies on one string procedure, LEN(string), which returns the number of characters in the string.
2.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
A movie website lets users create lists of their favorite movies.
When the user first starts, the website runs this code to create an empty list:
favMovies ← []
The user can then insert and remove items from the list.
Here's the code that was executed from one user's session:
"The Lion King", "The Matrix", "Lord of the Rings", "Shrek", "Spider-Man"
"The Lion King", "The Matrix", "Shrek", "Lord of the Rings", "Spider-Man"
"The Lion King", "Toy Story", "Lord of the Rings", "The Matrix", "Shrek", "Spider-Man"
"The Lion King", "Toy Story", "Shrek", "Lord of the Rings", "Spider-Man"
"The Lion King", "Toy Story", "The Matrix", "Lord of the Rings", "Shrek", "Spider-Man"
3.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
The following numbers are displayed by a program:
4 8 12 16
The program code is shown below, but it is missing three values: <COUNTER>, <AMOUNT>, and <STEP>.
Given the displayed output, what must the missing values be?
<COUNTER> = 2, <AMOUNT> = 4, <STEP> = 2
<COUNTER> = 1, <AMOUNT> = 4, <STEP> = 2
<COUNTER> = 4, <AMOUNT> = 4, <STEP> = 1
<COUNTER> = 4, <AMOUNT> = 2, <STEP> = 1
<COUNTER> = 2, <AMOUNT> = 2, <STEP> = 1
4.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
A program races four avatars against each other: Piceratops, Leafers, Duskpin, and Aqualine.
Here they are lined up at the start line, in that order:
After the first 3 repetitions of each loop, which avatar will be ahead?
Two avatars will be tied for the lead.
5.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
A javelin thrower is writing code to track the distance of their throws and how far they are from their target distance.
This is what they have so far:
A friend points out that they can reduce the complexity of their code by using the abstractions of lists and loops.
The programmer decides to "refactor" the code, to rewrite it so that it produces the same output but is structured better.
Which of these is the best refactor of the code?
6.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
The two programs below are both intended to display the total number of overtime hours worked, based on a list of logged hours for each day of a week.
Which of these statements best describes these two programs?
Program 1 and Program 2 display the same output and involve the same number of computations.
Program 1 and Program 2 display the same output, but Program 2 requires more computations.
Program 1 and Program 2 display the same output, but Program 1 requires more computations.
Program 1 displays the expected output, while Program 2 displays more output than necessary.
Program 2 displays the expected output, while Program 1 displays more output than necessary.
7.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
A vending machine manufacturer is writing code to determine the optimal prices for their products.
The program below processes a list of costs (in dollars and cents). The goal of the program is to create a new list that contains only the costs that can be paid entirely in quarters.
A line of code is missing, however.
What can replace <MISSING CODE> so that this program will work as expected?
APPEND(quarterCosts, costs)
INSERT(quarterCosts, costs)
APPEND(costs, cost)
INSERT(quarterCosts, cost)
APPEND(quarterCosts, cost)
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
25 questions
TLE Q3 EXAM REVIEWER
Quiz
•
8th Grade
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
18 questions
Publisher Basics
Quiz
•
7th - 10th Grade
25 questions
CPA Inkscape Quiz 01
Quiz
•
7th - 12th Grade
20 questions
CS-9 Chapter-2 Types of Computer Part1: Rabin Ghimire
Quiz
•
8th - 9th Grade
20 questions
Perangkat Lunak dan Struktur Pemrograman (UH 2)
Quiz
•
10th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
27 questions
CDI - Electronic Components & Signals
Quiz
•
10th - 12th Grade
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Computers
18 questions
[AP CSP] JavaScript Programming Lesson 2025-2026
Lesson
•
9th - 12th Grade
57 questions
[AP CSP] Unit 5 Review: Internet & Cybersecurity
Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
15 questions
Google Sheets
Quiz
•
7th - 8th Grade