wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP Review

Total questions: 60

Worksheet time: 46mins

Name
Class
Date
1.

Which of the following is LEAST likely to indicate a phishing attack?

a)

An e-mail from your bank asks you to call the number on your card to verify a transaction

b)

An e-mail from a merchant asks that you click on a link to reset your password

c)

An e-mail from a utility company asks you to enter your date of birth and social security number for verification purposes

d)

An e-mail indicates that you have won a large sum of money and asks you to enter your bank account number so that the money can be transferred to you

2.

Which of the following activities poses the greatest personal cybersecurity risk?

a)

Making a purchase at an online store that uses public key encryption to transmit credit card information

b)

Paying a bill using a secure electronic payment system

c)

Reserving a hotel room by e-mailing a credit card number to a hotel

d)

Withdrawing money from a bank account using an automated teller machine (ATM)

3.

A program is expressed in a programming language. Which of the following is true of the program?

a)

The program can also be expressed as binary code, but will be more easily understood by humans when expressed in a higher-level programming language.

b)

The program can also be expressed as binary code, which will reduce the likelihood of errors.

c)

The program cannot be expressed as binary code, because binary code can only be used to represent data.

d)

Some parts of the program can be expressed as binary code, but operations must be expressed using a higher-level programming language.

4.

Which of the following statements best describes the properties of public key encryption?

a)

Public key encryption is an encryption method which relies on separate keys for encrypting and decrypting information.

b)

Public key encryption is a highly secure encryption scheme that in which a single key is used by both the sender and receiver of the message.

c)

Public key encryption makes use of certain types of problems which are easier for humans to solve than computers.

d)

Public key encryption makes use of mathematical problems which no algorithm can be used to solve.

5.

Consider the process of encoding and decoding a message using the following Caesar cipher encoding scheme in which the plaintext and ciphertext alphabets are offset by four positions, as shown above.


Which of the following encoded ciphertext strings decodes to an original plaintext message of “secret”?

a)

ersecr

b)

wigvix

c)

kwujwl

d)

oaynap

6.

Which of the following best defines confidentiality in context with information and data?

a)

The ability to limit access to information to a certain set of users

b)

The certainty that information is accurate

c)

The confirmation that a company will not sell your information to others

d)

The reliability of access to information

7.

A large office building has an elevator that carries occupants between any of the building's 10 floors. The basement is referred to as "Level 0" while the topmost floor is "Level 9." The software for the elevator uses a variable, called level, to track the floor number of the elevator's current position. When a person presses a button requesting the elevator to rise to a higher floor, the above code is executed.


What is displayed if the elevator is currently on the 7th floor (level = 7) and the person on the elevator presses a button that says to go up 3 floors (floors = 3)?

a)

Level 7 Level 8 Level 9

b)

Level 8 Level 9 Cannot go up. Level 9

c)

Level 8 Level 9 Level 10

d)

Cannot go up.

8.

Consider the above code segments designed to find the area of a triangle (A = 1/2 bh).


Which of the following statements about the above programs is true?

a)

Both programs will work as intended, but Program B is more readable.

b)

Program A will work as intended, but Program B will not work as intended.

c)

Program B will work as intended, but Program A will not work as intended.

d)

Neither program will work as intended.

9.

Given the above code segment, what would be displayed if age were initialized with a value of 18?

a)

group 1

b)

group 2

c)

group 1 group 2

d)

Nothing will be displayed

10.

Which of the following would be the most appropriate name for a variable?

a)

variable1

b)

t

c)

amountOfTimeRemainingInTheGame

d)

time_left

11.

While developing a program, you find a similar project that someone has created and posted online. It contains a number of elements (e.g., images, music, code segments, etc.) that you would like to integrate into your own project. Under what conditions may you reuse these elements in your work?

a)

You may never reuse someone else’s work.

b)

You may reuse any elements that are posted publicly online as long as credit is given to their creator.

c)

You may only reuse elements for which the original owner has granted a license to reuse, such as the Creative Commons Share Alike license.

d)

You may always reuse anything that is posted publicly or privately online.

12.

Consider the above code.


Assuming that before this code is run, x = 1. What would be displayed at the end?

a)

210

b)

16

c)

8

d)

1

13.

What condition will make the above an infinite loop?

a)

y = -108

b)

y≠-3

c)

y ≥ 8

d)

y < -53

14.

Consider the above code segment.


Which of the following best describes the result of running the code segment?

a)

The number 0 is displayed.

b)

The number 4 is displayed.

c)

The number 10 is displayed.

d)

Nothing is displayed; the program results in an infinite loop.

15.

The volume of a rectangular prism is calculated by multiplying its length, width and height. What could be substituted into the section of the code marked < missing code > that would accurately calculate the volume based on the user input of l, w and h?

a)

l x w x h

b)

l * w * h

c)

l(w)(h)

d)

l / w / h

16.

ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter “G” is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table above.


ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the binary (base 2) number 1010100?

a)

N

b)

P

c)

T

d)

W

17.

Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?

a)

22

b)

37

c)

41

d)

82

18.

What value does the above code segment display?

a)

17

b)

36

c)

53

d)

No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.

19.

As of 2016, the selling of used digital media is illegal. Along with selling it, there are many other illegal uses of digital media. Which of the following would be a legal use of digital media?

a)

You download an app on your smartphone that allows you to ‘strip’ the audio from any YouTube music video and permanently keep that audio in your music collection.

b)

You make an MP3 copy of a song because the CD you bought expressly permits you to do so, and then you put your MP3 copy on the Internet, using a file-sharing network, so that millions of other people can download it.

c)

You have a computer with a CD burner, which you use to burn copies of music you have downloaded onto writable CDs for all of your friends.

d)

You download a song from iTunes and sync it to the cloud so that it is accessible on all of your devices.

20.

The above procedure check is called in a program after each time a True or False question is answered. If the user types in True True False True as their answers for four questions on a quiz, what should their overall score be?

a)

25%

b)

50%

c)

75%

d)

100%

21.

ASCII is a character-encoding scheme that uses 7 bits (8 bits if you are using the extended ASCII table) to represent each character. The decimal (base 10) values 65 through 90 represent the capital letters A through Z, as shown in the table above.


Which ASCII character is represented by the binary (base 2) number 1000001?

a)

A

b)

B

c)

C

d)

D

22.

Which of the following is an advantage that text-based programming languages (e.g., Processing) have over block-based programming languages (e.g., Scratch)?

a)

Text-based programming languages allow programmers to write programs in English and other natural languages.

b)

Text-based programming languages do not require the programmer to worry about syntax, capitalization, or punctuation.

c)

Programs written in text-based programming languages do not require debugging.

d)

Text-based programming languages offer programmers more detailed control over lower-level functionality when writing a program.

23.

In order to be inducted into a school’s National Honor Society (NHS), they must meet certain criteria for their GPA, serviceHours and grade. The expression below indicates whether a student has been accepted as a member of the NHS.


(GPA = 3.65) AND (serviceHours = 30) AND (NOT grade = 9)


Which of the following values would indicate a student that would be accepted into NHS?

a)

GPA = 3.85, serviceHours = 45, grade = 9

b)

GPA = 3.50, serviceHours = 100, grade = 10

c)

GPA = 4.00, serviceHours = 15, grade = 11

d)

GPA = 3.65, serviceHours = 30, grade = 12

24.

Which of the following is true about program documentation?

a)

Program documentation is only needed for programs in development; it is not needed after a program is completed.

b)

Program documentation is useful when programmers collaborate but not when a programmer works individually on a project.

c)

Program documentation is useful during initial program development and also when modifications are made to existing programs.

d)

Program documentation should not be changed after it is first written.

25.

A student is recording a song on her computer. When the recording is finished, she saves a copy on her computer. The student notices that the saved copy is of lower sound quality than the original recording. Which of the following could be a possible explanation for the difference in sound quality?

a)

The song was saved using fewer bits per second than the original song.

b)

The song was saved using more bits per second than the original song.

c)

The song was saved using a lossless compression technique.

d)

Some information is lost every time a file is saved from one location on a computer to another location.

26.

Which of the following are benefits of using well-named variables in a computer program?

Select two answers.

a)

The program will run faster.

b)

The program will be easier for people to read.

c)

The program will have a greater data storage capacity.

d)

The program will be easier to modify in the future.

27.
Working together to facilitate the application of multiple perspectives and diverse talents and skills is the definition of
a)
visualtion
b)
collaboration
c)
ReCAPTCHA
d)
crowdsourcing
e)
extraction
28.
Large amounts of structured and unstructured data that can potentially be mined, examined, and used by organizations is the definition of
a)
usable data
b)
data set
c)
usable data
d)
big data
e)
data collection
29.
The representation of information using a chart, diagram, image, etc. is the definition of
a)
indexing
b)
analytics
c)
extraction
d)
concatenation
e)
visualization(s)
30.
Chaining together or placing two or more separate things side by side so that they are treated as one is the definition of
a)
concatenation
b)
ReCAPTCHA
c)
indexing
d)
extraction
e)
cache
31.
A collection of numbers or values that relate to a particular subject usually portrayed in a relational database table.  Example: column header and row contents for test scores for each student. This is the definition of
a)
data set
b)
useful data
c)
usable data
d)
structured data
e)
data persistence
32.

What is an Event?

a)

An action that causes something to happen

b)

An action that doesn’t do anything in the App

c)

An action that will allow you to look up and event

d)

Something that is happening in the calendar

33.

What is the User Interface

a)

Elements of which the user controls

b)

Elements of which the coder controls

c)

An interface with code

d)

An interface with options

34.

Antivirus software is designed to protect computers from an assortment of viruses and unauthorized intrusions

a)

True

b)

False

35.

Consider the following code segment. result 𝑟 2 REPEAT 3 TIMES result 𝑟 result * 5 DISPLAY result Which of the following best describes the behavior of the code segment?

a)

The code segment displays the value of 2(5 × 3) by initializing result to 2 and then multiplying result by 3 a total of five times.

b)

The code segment displays the value of 2(5 × 3) by initializing result to 2 and then multiplying result by 5 a total of three times.

c)

The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 3 a total of five times.

d)

The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 5 a total of three times.

36.

Which of the following best describes the behavior of the procedure?

a)

It displays nothing if x is negative and displays true otherwise.

b)

It displays nothing if x is negative and displays false otherwise.

c)

It displays true if x is negative and displays nothing otherwise.

d)

It displays true if x is negative and displays false otherwise.

37.

A company that develops educational software wants to assemble a collaborative team of developers from a variety of professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team?

a)

Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing.

b)

Collaboration that includes diverse backgrounds and perspectives can help the team anticipate the needs of a variety of software users.

c)

Collaboration that includes diverse backgrounds and perspectives can help the team avoid bias.

d)

Collaboration that includes diverse backgrounds and perspectives can reflect the strengths of the individual team members.

38.

Which of the following is an advantage of a lossless compression algorithm over a lossy compression algorithm?

a)

A lossless compression algorithm can guarantee that compressed information is kept secure, while a lossy compression algorithm cannot.

b)

A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.

c)

A lossless compression algorithm typically allows for faster transmission speeds than does a lossy compression algorithm.

d)

A lossless compression algorithm typically provides a greater reduction in the number of bits stored or transmitted than does a lossy compression algorithm.

39.

A certain programming language uses 4-bit binary sequences to represent nonnegative integers. For example, the binary sequence 0101 represents the corresponding decimal value 5. Using this programming language, a programmer attempts to add the decimal values 14 and 15 and assign the sum to the variable total. Which of the following best describes the result of this operation?

a)

The correct sum of 29 will be assigned to the variable total.

b)

An overflow error will occur because 4 bits is not large enough to represent either of the values 14 or 15.

c)

An overflow error will occur because 4 bits is not large enough to represent 29, the sum of 14 and 15.

d)

A round-off error will occur because the decimal values 14 and 15 are represented as approximations due to the fixed number of bits used to represent numbers.

40.

A video game character can face toward one of four directions: north, south, east, and west. Each direction is stored in memory as a sequence of four bits. A new version of the game is created in which the character can face toward one of eight directions, adding northwest, northeast, southwest, and southeast to the original four possibilities. Which of the following statements is true about how the eight directions must be stored in memory?

a)

Four bits are not enough to store the eight directions. Five bits are needed for the new version of the game.

b)

Four bits are not enough to store the eight directions. Eight bits are needed for the new version of the game.

c)

Four bits are not enough to store the eight directions. Sixteen bits are needed for the new version of the game.

d)

Four bits are enough to store the eight directions.

41.

A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 counties across the United States. The program is intended to combine county data sets and then process the data. Which of the following is most likely to be a challenge in creating the program?

a)

A computer program cannot combine data from different files.

b)

Different counties may organize data in different ways.

c)

The number of counties is too large for the program to process.

d)

The total number of rows of data is too large for the program to process.

42.

Assume that both lists and strings are indexed starting with index 1. The list wordList has the following contents: ["abc", "def\", "ghi", "jkl"] Let myWord be the element at index 3 of wordList. Let myChar be the character at index 2 of myWord. What is the value of myChar?

a)

"e"

b)

"f\"

c)

"h"

d)

"i"

43.

Assume that the list of numbers nums has more than 10 elements. The program below is intended to compute and display the sum of the first 10 elements of nums. Line 1: i ← 1 Line 2: sum ← 0 Line 3: REPEAT UNTIL (i > 10) Line 4: { Line 5: i ← i + 1 Line 6: sum ← sum + nums[i] Line 7: } Line 8: DISPLAY (sum) Which change, if any, is needed for the program to work as intended?

a)

(A) Lines 1 and 2 should be interchanged.

b)

(B) Line 3 should be changed to REPEAT UNTIL (i ≥ 10).

c)

(C) Lines 5 and 6 should be interchanged.

d)

(D) No change is needed; the program works correctly.

44.

Which of the following best explains how algorithms that run on a computer can be used to solve problems?

a)

All problems can be solved with an algorithm that runs in a reasonable amount of time.

b)

All problems can be solved with an algorithm, but some algorithms might need a heuristic to run in a reasonable amount of time.

c)

All problems can be solved with an algorithm, but some algorithms might run in an unreasonable amount of time.

d)

Some problems cannot be solved by an algorithm.

45.

Consider the following code segment. x ← 25 y ← 50 z ← 75 x ← y y ← z z ← x Which of the variables have the value 50 after executing the code segment?

a)

x only

b)

y only

c)

x and z only

d)

x, y, and z

46.

Which of the following statements best explains the ability of the network to provide fault tolerance?

a)

The network is considered fault-tolerant because there are redundant paths between each pair of devices.

b)

The network is considered fault-tolerant because it guarantees that no individual component will fail.

c)

The network is not considered fault-tolerant because it relies on physical connections.

d)

The network is not considered fault-tolerant because it provides more paths than are needed.

47.

Which of the following best explains how fault tolerance in a network is achieved?

a)

By providing high-bandwidth connections between devices, enabling data packets to be transmitted as quickly as possible

b)

By providing multiple paths between devices, enabling routing to occur even in the presence of a failed component

c)

By providing open network protocols, ensuring that all devices on the network are interacting in a standard way

d)

By providing software to monitor all network traffic, ensuring that data packets are sent and received in the proper order

48.

The message is broken into packets that are transmitted in a specified order. Each packet must be received in the order it was sent for the message to be correctly reassembled by the recipient’s device. (A) The message is broken into packets that are transmitted in a specified order. Each packet must be received in the order it was sent for the message to be correctly reassembled by the recipient’s device. (B) The message is broken into packets. The packets can be received in any order and still be reassembled by the recipient’s device. (C) The message is broken into two packets. One packet contains the data to be transmitted and the other packet contains metadata for routing the data to the recipient’s device. (D) The message is transmitted as a single file and received in whole by the recipient’s device.

a)

The message is broken into packets that are transmitted in a specified order. Each packet must be received in the order it was sent for the message to be correctly reassembled by the recipient’s device.

b)

The message is broken into packets. The packets can be received in any order and still be reassembled by the recipient’s device.

c)

The message is broken into two packets. One packet contains the data to be transmitted and the other packet contains metadata for routing the data to the recipient’s device.

d)

The message is transmitted as a single file and received in whole by the recipient’s device.

49.

What is a common ethical issue related to social media?

a)

High-speed internet

b)

Data privacy concerns

c)

Increased screen resolution

d)

Faster download speeds

50.
If a binary number ends with a 1, it must be...
a)
An odd number
b)
An even number
c)
A prime number
d)
The number 12
51.

Add the following binary numbers:

01

11

a)

101

b)

11

c)

111

d)

100

52.
Convert 01000100 to decimal
a)
58
b)
68
c)
78
d)
88
53.
Convert 65 to binary
a)
01100001
b)
00100001
c)
01000001
d)
00100101
54.

what is a binary code

a)

A squence of 1s and 0s

b)

The way computer speaks

c)

code no longer used

55.
Why is IP v4 going to be replaced by IP v6?
a)
IP v6 is easier to use.
b)
IP v4 does not work on old hardware.
c)
IP v4 was not encrypted.
d)
We are running out of IP v4 addresses.
56.

What is an Event?

a)

An action that causes something to happen

b)

An action that doesn’t do anything in the App

c)

An action that will allow you to look up and event

d)

Something that is happening in the calendar

57.
What is the purpose of DNS?
a)
It assigns a unique address to every device on the Internet.
b)
It returns the IP address given the name of a website.
c)
It forwards a message from one machine to another.
d)
It has more bits so you can make a longer, unique address.
58.

Binary code comprises of digits from 0 to 9.

a)

True

b)

False

59.

Which of the following is true of intellectual property?

a)

Creative Commons has severely hindered broad and open access to digital information

b)

Creative Commons enables content creators to freely distribute their otherwise copyrighted work

c)

Information created on a computer is not owned by anyone since only analog information is protected under copyright law.

d)

You do not need to cite work created by someone else if both the original work and your use of it are in digital form.

60.

Which of the following binary (base-2) numbers is LARGEST?

a)

00000001

b)

01111111

c)

10111111

d)

11000000