wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AP CSP Final

Total questions: 35

Worksheet time: 34mins

Name
Class
Date
1.
Which of the following can be used to combine two strings to create a new string?
a)
concatenation
b)
algorithm
c)
conditional
d)
variable
2.
Which of the following is TRUE about routers? 
a)
One "root" router is responsible for communication to all "sub-routers"
b)
Routers act independently
c)
A path is established before the message is sent
3.
What is the number 45 as a binary number?
a)
10011111
b)
00001100
c)
00101101
d)
10101010
4.
The binary number 01000001 represents the letter "A" in ASCII, which of the following represents the letter "B"
a)
01000011 
b)
01000010 
c)
00100001 
d)
01000001 
5.
extremely large data sets that may be analyzed computationally to reveal patterns, trends, and associations, especially relating to human behavior and interactions.
a)
"Digital Divide"
b)
Algorithm
c)
GeoCaching
d)
"Big Data"
6.
an economic and social inequality with regard to access to, use of, or impact of information and communication technologies.
a)
"Digital Divide"
b)
Algorithm
c)
GeoCaching
d)
"Big Data"
7.

Consider the following code:

var a = 0

var b = 2

var c = 6

a = a+b

b=a+c

c=a+b

What are the values of a, b, and c after this code segment has been run?

a)

a= 0 b=2 c=6

b)

a=2 b=6 c=2

c)

a=2 b=2 c=8

d)

a= 2 b=8 c=10

8.

You are writing a reply function for a text messaging app. You want to swap the sender and receiver so that the value currently in From ends up as the value in To and To ends up in From. Which code segments will correctly swap the values?

a)

to = from

from = to

b)

from = var temp

to = temp

from = to

c)

var temp = from

from = to

to = from

d)

var temp = from

from = to

to = temp

9.

Consider the code segment:


var dist = 100

var radius = dist/20

penDown();

for(var i=0; i<4; i++){

moveForward(dist);

dot(radius);

turnRight(90);}


What image would this code produce?

a)

A triangle with 3 medium dots

b)

A square with 4 extremely large dots

c)

A square with 4 medium dots

d)

A triangle with 4 extremely large dots

10.

What is the output to the console after the following code segment is run?


var x = 10;

increase();

x = x+3;

console.log(x);

function increase(){

var x =5}

a)

5

b)

8

c)

10

d)

13

e)

Error. Cannot make a new variable x inside function increase()

11.
What kind of data would we store in a "String" parameter?
a)
objects
b)
dates
c)
whole numbers
d)
text 
12.
The number system used by human beings in every day life is
a)
base-2
b)
base-10
c)
base-16
d)
none of these
13.
The number system used by computers
a)
base-2
b)
base-10
c)
base-16
d)
none of these
14.
How is structured programming similar to a recipe?
a)
The steps must be performed in a certain order to produce the proper result
b)
The steps can be altered in any way without affecting the results.
c)
The steps may be performed in any order to produce the proper result.
d)
The steps must be repeated to produce the proper result.
15.
What is the process that a programmer uses to identify errors and make corrections to a program that does not perform the way it was intended or produces incorrect results?
a)
Debugging
b)
Executing
c)
Testing
d)
Compiling
16.
Which of the following scenarios is most characteristic of a phishing attack?
a)
You accidentally run a piece of code that automatically spreads from one computer to another, exploiting a common vulnerability 
b)
You get an email from the IT support desk that asks you to send a reply email with your username and password to verify your account 
c)
You get an unwanted email trying to sell you a low quality product or service that seems "fishy.” 
d)
You accidentally install a piece of software that monitors your activity to steal personal information like your passwords, date of birth, social security number, etc. 
17.
Which of the following most accurately describes Moore's Law:
a)
Moore's Law describes a relationship of boolean logic statements involving AND and OR 
b)
Moore's Law is the principle that one should assume that any traffic on the Internet is insecure 
c)
Moore's Law is the observation that computing power tends to double every two years 
d)
Moore's Law explains why cracking modern cryptography is a "computationally hard" problem 
18.
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 shared 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. 
19.
Programming languages have some similarities and differences to the “natural” language you use in everyday speech. Select the true statement about programming languages:
a)
Compared to the number of words in a natural language, the number of defined words in a programming language is very small. 
b)
The number of defined words in a programming language is about the same as the number of words in a natural language. 
c)
There are typically many possible ways to interpret an instruction written in a programming language. 
20.
Which one of the following statements about functions is TRUE?
a)
A function can change names over the course of a program. 
b)
Code can be added or removed dynamically from a function while the program is running. 
c)
Functions can be called using different names depending on where in the program they are called. 
d)
Two functions in a single program can have different names but contain identical code. 
21.
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the task: Drawing a hexagon (six-sided shape)
a)
Loop 
b)
Function(s) 
22.
For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions) to handle the task:Drawing a circle of any size at any point on the screen
a)
Loop 
b)
Function(s) 
23.
When programmers work together, what is an example of how abstraction in programming can promote collaboration? 
a)
Team members can rely on one another to explain their code. 
b)
Programmers can write functions without needing to know what they do or how they should work. 
c)
Programmers can use functions created by their partners, relying on the functionality without needing to know the specific details of how the function is implemented. 
d)
 D.  In order for programmers to work together, they must work in the same room. 
24.
__________ means to repeat in order to achieve, or get closer to, a desired goal.
a)
Sequence
b)
Iterate
c)
Select
25.
Putting commands in correct order so computers can read the commands is 
a)
algorithms
b)
selection
c)
sequencing
26.
___________ programming is a classic method for learning programming with commands to control movement and drawing of an on-screen robot. 
a)
Snail
b)
Robot
c)
Turtle
27.
A description of the behavior of a command, function, library, API, etc.
a)
API
b)
Library
c)
Documentation
28.
A base-16 number system that uses sixteen distinct symbols 0-9 and A-F to represent numbers 0 to 15 is?
a)
Binary
b)
API
c)
Hexadecimal
29.
A _________ is an extra piece of information passed to a function to customize it for a specific need.
a)
Parameter
b)
Documentation
c)
Library
30.
How many binary digits are needed to write the decimal number 999?
a)
8
b)
9
c)
10
d)
11
31.
What is true regarding programming documentation (use of comments, notations, etc.)
a)
It should not be changed after it is first written.
b)
It helps during initial program development and also when modifications are made
c)
It is only needed during program development, not after completion
d)
It is only useful for collaboration, not independent programming.
32.
When programmers work together, what is an example of how abstraction in programming can promote collaboration? 
a)
Team members can rely on one another to explain their code. 
b)
Programmers can write functions without needing to know what they do or how they should work. 
c)
Programmers can use functions created by their partners, relying on the functionality without needing to know the specific details of how the function is implemented. 
d)
In order for programmers to work together, they must work in the same room. 
33.

The diagram below shows a circuit composed of three logic gates. Each gate takes two inputs and produces a single output. For which of the following input values will the circuit have an output of false?

a)

A = true, B = false, C = false, D = false

b)

A = true, B = true, C = false, D = false

c)

A = false, B = false, C = true, D = true

d)

A = false, B = false, C = false, D = true

34.
Which bit-sending technology is used for fiber optic cables?
a)
Electric voltage
b)
Alternating frequencies
c)
Beam of light
d)
Magic
35.
Tranmission Control Protocol:
a)
Breaks messages into packets and addresses them
b)
A DNS attack in which numerous pings are made to the same IP, causing it to crash
c)
Protocol used by the World Wide Web. It describes how messages are formatted and interchanged, and how web servers respond to commands.
d)
Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet