CSP CodeHS U8 8.2 & 8.2
Quiz
•
Computers
•
8th - 10th Grade
•
Hard
Thomas Martinez
FREE Resource
Enhance your content
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)
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?
Similar Resources on Wayground
21 questions
Code.Org - Part II
Quiz
•
6th - 8th Grade
21 questions
Introduction to CS
Quiz
•
7th Grade - University
22 questions
for loop
Quiz
•
9th Grade
19 questions
Computer Science 1.5 - Topologies, Layers and Protocols
Quiz
•
9th - 11th Grade
20 questions
AQA GCSE Computer Science - 3.2.10 Subroutines
Quiz
•
8th - 10th Grade
23 questions
Coding Vocabulary
Quiz
•
5th - 8th Grade
20 questions
Ethics in Computing 2
Quiz
•
8th - 11th Grade
25 questions
Algorithms - python (GCSE)
Quiz
•
10th - 12th Grade
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 Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
18 questions
Company Logos
Quiz
•
6th - 8th Grade
30 questions
Computer Terminology Exercise #1 ( Fill Ins)
Quiz
•
9th Grade
15 questions
MLA Formatting
Quiz
•
9th Grade
20 questions
Typing Practice
Quiz
•
7th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro
Lesson
•
5th - 9th Grade
20 questions
Google Sheets Quiz
Quiz
•
9th Grade