
AP Review 2
Computers
9th - 12th Grade
Used 49+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
An application program interface (API) provides a procedure Max, which returns the greater of its two integer
arguments.
A programmer would like to find the greatest of three integer values a, b, and c. Which of the following
expressions will produce the desired result in every case?
Max (Max (a, b), c)
Max (a, b) - Max (b, c)
Max (a, b) + Max (b, c) – Max (a, c)
(Max (a, b) + Max (b, c)) / 2
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially
facing right.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
A student is creating a procedure to determine whether the weather for a particular month was considered very
hot. The procedure takes as input a list containing daily high temperatures for a particular month. The procedure
is intended to return true if the daily high temperature was at least 90 degrees for a majority of days in the
month and return false otherwise.
Which of the following can be used to replace <MISSING CODE> so that the procedure works as intended?
counter < 0.5 * total
counter > 0.5 * total
total < 0.5 * counter
total > 0.5 * counter
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The following figures represent different ways of configuring a network of physically linked computers labeled P, Q, R, and S. A line between two computers indicates that the computers can communicate directly with each other.
In which configuration is it NOT possible to have redundant routing between computers P and S?
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters.
For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" by replacing all instances of "TH" with "%" and replacing all instances of "IS" with "#".
Which of the following statements about byte pair encoding is true?
Byte pair encoding is an example of a lossy transformation because it discards some of the data in the original string.
Byte pair encoding is an example of a lossy transformation because some pairs of characters are replaced by a single character.
Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.
Byte pair encoding is an example of a lossless transformation because it can be used to transmit messages securely.
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters.
For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" by replacing all instances of "TH" with "%" and replacing all instances of "IS" with "#".
For which of the following strings is it NOT possible to use byte pair encoding to shorten the string’s length?
"BANANA"
"LEVEL_UP"
"MEET_ME_LATER"
"NEITHER_HERE_NOR_THERE"
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The grid contains a robot represented as a triangle, initially facing up. The robot can move into a white or gray square but cannot move into a black region.
The code segment below uses the procedure GoalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise.
REPEAT UNTIL (GoalReached ())
{
<MISSING CODE>
}
Which of the following replacements for <MISSING CODE> can be used to move the robot to the gray square?
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
15 questions
Cyber Security Homework 1
Quiz
•
7th - 9th Grade
12 questions
JUEGO - UNIDADES DE MEDIDA DE ALMACENAMIENTO
Quiz
•
1st - 10th Grade
10 questions
ICT Java programming workshop
Quiz
•
9th Grade
10 questions
ICT as Social Change
Quiz
•
12th Grade
10 questions
C# lesson10
Quiz
•
1st - 10th Grade
15 questions
SIKOMDIK
Quiz
•
10th Grade
10 questions
Konsep Routing
Quiz
•
1st - 10th Grade
12 questions
ICT Computer Basics pt1
Quiz
•
10th - 12th Grade
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
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th 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