NEW
Font size
WorksheetsAP CSP Exam Review
Total questions: 20
Worksheet time: 37mins
What does it mean when we say the Internet is redundant?
If a path is down, packets can be routed a different way.
The Internet has multiple servers for the same content.
Redundancy means the Internet is slower than usual.
It refers to the Internet being less reliable.
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
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
Trace the value of an integer variable n in the following code.
i ← 1
n ← 2
REPEAT until i = 4
{
n ← n * 2
i ← i + 1
} What is n?
8
12
16
20
A piece of code that you can easily call over and over again.
Variables
Functions
Classes
Loops
What is the latency of a system?
The time it takes for a bit to travel from sender to receiver
The speed at which data is processed
The amount of data that can be transmitted in a given time
The time it takes for a system to boot up
Which bit-sending technology is used for fiber optic cables?
Electrical signals
Radio waves
Beam of light
Microwaves
How many times will this loop run?
for i in range (1, 4):
2
3
4
5
Which of the following statements about the ability of computers is most accurate?
- There are some problems that personal computers can’t solve, but supercomputers can solve those problems when given enough time to spend on them.
- There are some problems that current computers can’t solve, but we hypothesize that more powerful computers in the near future will be able to solve them.
- Computers can solve every problem, and do so in a reasonable amount of time.
- There are some problems a computer can’t solve, no matter how much time they have.
There are some problems that personal computers can’t solve, but supercomputers can solve those problems when given enough time to spend on them.
There are some problems that current computers can’t solve, but we hypothesize that more powerful computers in the near future will be able to solve them.
Computers can solve every problem, and do so in a reasonable amount of time.
There are some problems a computer can’t solve, no matter how much time they have.
Which of the following statements are true about lossless compression?
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.
I only
II only
Both I and II
Neither I nor II
What describes the process of keeping common or similar features and functionality while removing details that are different?
Abstraction
Encapsulation
Polymorphism
Inheritance
According to the domain name system (DNS), which of the following is a subdomain of the domain code.org?
educate.code.org
code.com
code.org/apcsp/lesson10
code.co.uk
What does Protocol mean?
Rules
Guidelines
Procedures
Standards
What is the best explanation for why digital data is represented in computers in binary?
It allows for more complex data representation.
It's easier, cheaper, and more reliable to build machines and devices that only have to distinguish between binary states.
Binary representation is a universal standard for all data types.
It reduces the amount of data storage required.
Which of the following is NOT a benefit of procedural abstraction?
Making the code run faster
Making the code more readable
Providing more opportunities for code reuse
Reducing the amount of duplicated code
Why is it important to focus on programming style in addition to programming functionality?
Program style helps others understand your program and maintain it
Programming style only applies to certain programming languages
Programming style increases the reusability of your code
Programming style is irrelevant to software development
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 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.
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.
What is displayed as a result of the procedure call proc2("birthday", "to you")?
happy birthday to you
to you happy birthday
birthday to you happy
to you birthday
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?
128
256
512
1024
Which of the following procedures would be most useful as part of a program to determine whether a word appears in two different text files?
A procedure getWords, which takes a positive integer n and a text file as input and returns the first n words in the text file.
A procedure textMatch, which takes two text files as input and returns true if the two text files are identical.
A procedure isFound, which takes a word and a text file as input and returns true if the word appears in the text file.
A procedure sameSize, which takes two text files as input and returns true if the two text files contain the same number of words.
Which of the following statements about abstraction is true?
Abstraction requires users to understand the low-level details of a system.
Abstraction reduces information and detail to facilitate focus on relevant concepts.
Abstraction increases the run-time complexity of a program.
Abstraction compresses a program file to reduce file size.
