CSP CodeHS U8 8.2 & 8.2
Quiz
•
Computers
•
8th - 10th Grade
•
Hard
Thomas Martinez
FREE Resource
Enhance your content in a minute
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
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
19 questions
HTML Concepts and Terms Review Game
Quiz
•
6th - 8th Grade
20 questions
Operator Aritmetika dan Perbandingan
Quiz
•
10th Grade
19 questions
1.1.2.CPU performance
Quiz
•
10th - 11th 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
25 questions
TLE Q3 EXAM REVIEWER
Quiz
•
8th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
Email your Teacher
Quiz
•
6th - 8th Grade
20 questions
Six Weeks Test 2 Review
Lesson
•
9th - 12th Grade
12 questions
Overview of Mexico Part 1
Lesson
•
9th - 12th Grade
40 questions
Programming with Karel
Quiz
•
6th - 8th Grade
20 questions
Binary Numbers Quiz
Quiz
•
6th - 8th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade
