NEW
Font size
WorksheetsAP CSP Exam Review
Total questions: 27
Worksheet time: 47mins
What does it mean when we say the Internet is redundant?
Parts of it are unnecessary
If a path is down, packets can be routed a different way
It has a delay between the request and the response to the request
If there is an error, a backup system is brought online to be used
What are packets when referring to the Internet?
The delay in time from when a request is sent and received
The individual sections of the IP address
Information to be sent over the Internet broken into same size groupings
The intermediate locations that send information to their destination
What describes the process of keeping common or similar features and functionality while removing details that are different?
An alorithm
Decomposition
Simulation
Abstraction
How are algorithms and programs related?
They have a hierarchical relationship
Programs implement algorithms
Algorithms implement programs
They can both be run on a computer
What is a benefit of collaboration when writing code?
Collaboration allows the work to be divided among independent programmers to create.
Collaboration makes it easier to document another person's code
Collaboration makes it eastier to find errors
Collaboration produces an increase in user requirements that can be met with more team members.
I - Lossless compression is used only to send files over the Internet
II - Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user.
PROCEDURE MoveTriangle (numMoves, numTurns)Which of the following instructions will get the red triangle to the gray square?
{
REPEAT numMoves TIMES
{
MOVE_FORWARD()
}
REPEAT numTurns TIMES
{
TURN_RIGHT()
}
}
MoveTriangle (1, 1) MoveTriangle (1, 1) MoveTriangle (3, 1) MoveTriangle (3, 0)
MoveTriangle (4, 1)
MoveTriangle (4, 0)
MoveTriangle (1, 1)
MoveTriangle (1, 3)
MoveTriangle (3, 1)
MoveTriangle (3, 0)
MoveTriangle (1, 1)
MoveTriangle (1, 3)
MoveTriangle (3, 3)
MoveTriangle (3, 0)
a and b, using a temporary integer variable, temp. Will the pseudo-code correctly perform the required task (assume that a and b are never numerically equal)?This is the pseudo-code that the programmer has come up with:
temp ← a # statement 1.
b ← temp # statement 2.
a ← b # statement 3.
Trace the value of an integer variableWhat is n?nin the following code.
i ← 1
n ← 2
REPEAT until i = 4
{
n ← n * 2
i ← i + 1
}
Why is it important to focus on programming style in addition to programming functionality?
I) Program style helps others understand your program and maintain it
II) Programming style only applies to certain programming languages
III) Programming style increases the reusability of your code
Only I
I and II
I and III
II and III
Which of the following activities poses the LEAST potential cybersecurity risk?
Clicking on a link in an email from an unknown sender
Sharing your device’s private key used for encryption
Sharing your device’s public key used for encryption
Using a credit card to make an online purchase on a website that does not use encryption
Suppose we used an Internet Addressing protocol that used 8 bits to encode a single address. With this protocol, how many devices would be able to have their own unique address?
64
256
16
128
How many times will this loop run?
for i in range (1, 4):
4
1
2
3
Which one of the following statements about functions is TRUE
A function can change names over the course of a program.
Code can be added or removed dynamically from a function while the program is running.
Functions can be called using different names depending on where in the program they are called.
Two functions can be given identical names as long as their code is identical.
Two functions in a single program can have different names but contain identical code.
A blogging Website allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following metadata.
The time the message was posted;
The name of the user who posted the message;
The names of any users who comment on the message and the times the comments were made;
Which of the following questions could NOT be answered using only the data and metadata collected?
Which users post messages most frequently?
What time of day is the site most active?
Which posts from a particular user have received the greatest number of comments?
In what country is the site most active?
An artist makes an RGB raster image in which each pixel color is encoded with 12-bits --- 4 bits each for red, green and blue.Which of the following correctly shows the hexadecimal value for Red as a 12-bit representation.
F00
00F
FF00
FF0000
Which of the following is irreversible?
lossy compression
lossless compression
abstraction
RLI
How would you lighten the color #bcc8e1?
+50 to each color component
+50 to the red component
-50 to each color component
-50 to the red component
Which of the following statements is FALSE?
The computer stores colors in hexadecimal
Every color has 3 components. A red, green and a blue component.
A bright color would be represented by a large number.
A computer uses 3 bytes to store a single colored pixel.
Consider the following three binary numbers:
01010
010000
1110
Which of the following lists the numbers in order from least to greatest?
010000
1110
01010
01010
1110
010000
01010
010000
1110
1110
01010
010000
