wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

APCSP Exam Review

Total questions: 63

Worksheet time: 1hrs 13mins

Name
Class
Date
1.

The mayor of a city is interested in learning what goals are most important for residents of the city. Members of her staff visit one of the many neighborhoods in the city and ask 20 residents to fill out a survey. The mayor is concerned that the survey may be biased and not accurately reflect the overall interests in her town. Which of the following strategies is MOST likely to address concerns about the data being biased or inaccurate

a)

Finding the same people surveyed previously to ask more detailed questions.

b)

Visiting the same neighborhood to collect more survey responses

c)

Visiting multiple new neighborhoods to collect more survey responses

d)

Having her staff collect the data using an app rather than paper surveys

2.

In which of the following situations would parallel systems MOST likely be used to help analyze data?

a)

Data analysis involving two or more columns of data

b)

Data analysis involving both string and numeric data

c)

Data analysis involving large datasets

d)

Data analysis that could result in two or more different types of visualizations

3.

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.

4.

Which of the following applications is most likely to benefit from the use of crowdsourcing?

a)

An application that allows users to convert measurement units (e.g., inches to centimeters, ounces to liters)

b)

An application that allows users to purchase tickets for a local museum

c)

An application that allows users to compress the pictures on their devices to optimize storage space

d)

An application that allows users to view descriptions and photographs of local landmarks

5.

A mobile application is used to display local traffic conditions. Which of the following features of the application best exemplifies the use of crowdsourcing?

a)

Users can save an address to be used at a later time.

b)

Users can turn on alerts to be notified about traffic accidents.

c)

Users can submit updates on local traffic conditions in real time.

d)

Users can use the application to avoid heavily congested areas.

6.

Tranmission Control Protocol (TCP):

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
7.
Which bit-sending technology is used for Ethernet cables?
a)
Electric voltage
b)
Alternating frequencies
c)
Beam of light
d)
Magic
8.
Which bit-sending technology is used for fiber optic cables?
a)
Electric voltage
b)
Alternating frequencies
c)
Beam of light
d)
Magic
9.
The world is currently in a transition to using IPv6, a newer version of the IP protocol that uses 128-bit addresses instead of 32-bit addresses used by IPv4. What is the main problem that IPv6 was created to solve?
a)
IPv6 will allow problems with IPv4's address hierarchy to be resolved
b)
32-bit addresses could not ensure that every internet-connected device can receive a unique IP address
c)
32-bit addresses could not accommodate the increased size and amount of data traveling on the Internet as it has grown in popularity
d)
IPv4 proved unreliable in some cases where network redundancy could not be ensured
10.

Which of the following are logic gates?

a)

AND

b)

Switch

c)

IF

d)

Else

e)

OR

11.

Which logic gate is associated with the  truth table?


a)

NAND

b)

OR

c)

NOT

d)

AND

12.

Which logic gate is associated with the following truth table?

a)

AND

b)

NAND

c)

OR

d)

OR

13.

Which logic gate is associated with the truth table?

a)

AND

b)

OR

c)

NAND

d)

NOR

14.

Look at the truth table below and choose the correct option.

a)

False, False

b)

True, False

c)

False,True

d)

True,True

15.
What gate is this table for?
a)
AND
b)
OR
c)
NOT
d)
NOR
16.
What gate is this truth table for?
a)
AND
b)
OR
c)
NOT
d)
THE 
17.

Which is the truth table for the AND gate?

a)
b)
c)
d)
e)
18.
Which type of lists or data sets are binary searching algorithms used for?
a)
Unsorted lists or data sets
b)
Sorted lists or data sets
19.
Select the best description to explain what a linear search algorithm is.
a)
Put the elements in order, check each item in turn.
b)
Put the elements in order, compare with the middle value, split the list in order and repeat.
c)
Elements do not need to be in order, check each item in turn.
d)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
20.

Select the best description to explain what a binary search algorithm is.

a)

Put the elements in order, check each item in turn.

b)

Put the elements in order, compare with the middle value, split the list in order and repeat.

c)

Elements do not need to be in order, check each item in turn.

d)

Elements do not need to be in order, compare to the middle value, split the list in order and repeat

21.
A binary search is to be performed on the list:
3  5  9  10  23
How many comparisons would it take to find number 9?
a)
0-1
b)
2-3
c)
4-5
d)
I can't find the number 9
22.
A binary search is to be performed on the list:
1  5  10  13  48  68  100  101
How many comparisons would it take to find number 101?
a)
0-1
b)
1-2
c)
3-4
d)
4-5
23.
Describe an advantage of a linear search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
24.
What does a binary search do?
a)
Looks at the first item of data, then each one in turn, until it finds the data item requested
b)
Converts all the data into binary
c)
Takes the data and splits it in half repeatedly until it finds the data item requested
25.
What type of key is not shared and computers cannot decrypt a message without it?
a)
Free key
b)
Private key
c)
Public key
d)
Personal key
26.
If the same key is used to encrypt and decrypt a message, this is known as? 
a)
Symmetric encryption
b)
Encryption doesn't exist!
c)
Asymmetric encryption
d)
Same-key encryption
27.
What type of key can be freely shared with anyone so that they can encrypt a message?
a)
Personal key
b)
Private key
c)
Free key
d)
Public key
28.
All Public Keys have a matching Private Key
a)
True
b)
False
29.

What does SSL stand for?

a)

Secure Socket Layer

b)

Secret Secure Layer

c)

Security Saver Layer

30.
An encryption key is used to help decrypt messages
a)
True
b)
False
31.

Taking a secret message and reproducing the original plain text is known as?

a)

Caesar Cipher

b)

Encryption

c)

Cipher Text

d)

Decryption

32.

Asymmetric encryption uses only 1 key.

a)

True

b)

False

c)

Maybe

d)

God Knows

33.

The process of converting plaintext to ciphertext.

a)

cryptography

b)

cyphertext

c)

decryption

d)

encryption

34.

Information that is readable without performing any cryptographic operations.

a)

cryptography

b)

plaintext

c)

encryption

d)

decryption

35.
A program runs and, during running, is asked to divide by zero. The program crashes. This is an example of:
a)
a logic error
b)
a run-time error
c)

a syntax error

d)
a user error
36.
What's the mistake in this code?
a)
Capital H in "What"
b)
Misspelling of the word "input"
c)
Capital letter missing from "print"
d)
Capital letter missing from "input"
37.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
38.

A finite set of instructions that accomplish a task.

a)

Problem

b)

Algorithm

c)

Sequencing

d)

Iteration

39.

_________ is an artificial and informal language that helps programmers develop algorithms. _________ is a "text-based" detail (algorithmic) design tool.

a)

Problem

b)

Algorithm

c)

Pseudocode

d)

Iteration

40.

Any algorithm whose efficiency includes an n2, n3, n4 … is called ___________.

a)

Problem

b)

Polynomial

c)

Pseudocode

d)

Efficiency

41.

Any algorithm whose efficiency includes an 2n, 3n, 4n … is called ______________.

a)

Problem

b)

Polynomial

c)

Exponential

d)

Efficiency

42.

Algorithms with a polynomial efficiency or lower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time.

a)

true

b)

false

43.

Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.

a)

false

b)

true

44.

Provides a "good enough" solution to a problem when an actual solution is impractical or impossible.

a)

Heuristic

b)

Undecidable Problem

c)

Unreasonable Time

d)

Reasonable Time

45.

A problem for which no algorithm can be constructed.

a)

Heuristic

b)

Undecidable Problem

c)

Unreasonable Time

d)

Reasonable Time

46.

Programs run in order, one command at a time.

a)

Sequential Computing

b)

Parallel Computing

c)

Distributed Computing

d)

Speedup

47.

Programs are broken into small pieces, some of which are run simultaneously.

a)

Sequential Computing

b)

Parallel Computing

c)

Distributed Computing

d)

Speedup

48.

How many bits are in an ipv4 address?

a)

16

b)

32

c)

64

d)

128

49.

What is an IP address?

a)

A unique string of numbers that identifies each computer on a network.

b)

An unique number to identify mouse and keyboard

c)

An address used to find a printer

d)

An address to identify computer hardware

50.

IP stands for __________.

a)

Internet Protocol

b)

Identification Protocol

c)

Internet Address

d)

Internet Person

51.
Which of the following is the newer version of IP addresses because the previous version only provided 4 billion unique addresses?
a)
IPv6
b)
IPv4
c)
IPv7
d)

iMax

52.
This IP address has 4 part. 
Each part contains 8 bit of numbers
Each part is separated by periods
The description above refers to _______
a)
IPv4
b)
IPv6
c)
Internet
d)
Extranet
53.

Which layer of the Internet Protocol stack uses IP addresses?

a)

Application

b)

Transport

c)

Internet

d)

MAC

54.
Which data type contains only two values and is used to compare conditions?
a)
String
b)
Boolean
c)
Floating Point
d)
Integer
55.
What is the function of the <= operator?
a)
Greater than or equal to
b)
Less than or equal to
c)
Not equal to
d)
And equal 
56.

Which choice lists examples of logical operators?

a)
++, !=, ||
b)
!, &&, %
c)
++, %, !
d)
&&, !, ||
57.
Telling a program that a specific named variable exists is called:
a)
declaring
b)
evaluating
c)
initializing
d)
naming
58.
A whole number that does not contain a decimal is a ________?
a)
character
b)
integer
c)
string
d)
floating point
59.
What is the term for a combination of variables, values, functions and operators?
a)
Expressions
b)
Variables
c)
Programs
d)
Algorithms
60.
Expressions are evaluated using _______.
a)
variable rules
b)
order of operations
c)
rules of initializing
d)
declaration
61.

The grid below contains a robot represented as a triangle, initially facing toward the top of the grid. The robot can move into a white or gray square but cannot move into a black region.

The code segment below uses the proceduregoalReached, 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?

a)

IF(CAN_MOVE(left))

{

ROTATE_LEFT()

MOVE_FORWARD()

}

b)

IF(CAN_MOVE(forward))

{

MOVE_FORWARD()

ROTATE_LEFT()

}

c)

IF(CAN_MOVE(left))

{

ROTATE_LEFT()

}

MOVE_FORWARD()

d)

IF(CAN_MOVE(forward))

{

MOVE_FORWARD()

}

ELSE

{

ROTATE_LEFT()

}

62.

The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right.

Which of the following code segments will move the robot to the gray square along the path indicated by the arrows?

a)

botStepper(2)

botStepper(3)

b)

botStepper(3)

botStepper(4)

c)

botStepper(2)

MOVE_FORWARD

botStepper(3)

d)

botStepper(3)

MOVE_FORWARD

botStepper(4)

63.

The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the center square and facing toward the top of the grid.

The following code segment is used to move the robot in the grid.

count ← 1

REPEAT 4 TIMES

{

REPEAT count TIMES

{

MOVE_FORWARD()

}

ROTATE_LEFT()

count ← count + 1

}

Which of the following code segments will move the robot from the center square along the same path as the code segment above?

a)

count 0

REPEAT 4 TIMES

{

count ← count + 1

REPEAT count TIMES

{

MOVE_FORWARD()

}

ROTATE_LEFT()

}

b)

count 0

REPEAT 4 TIMES

{

count ← count + 1

ROTATE_LEFT()

REPEAT count TIMES

{

MOVE_FORWARD()

}

}

c)

count 0

REPEAT 4 TIMES

{

REPEAT count TIMES

{

ROTATE_LEFT()

}

MOVE_FORWARD()

count ← count + 1

}

d)

count 0

REPEAT 4 TIMES

{

ROTATE_LEFT()

REPEAT count TIMES

{

MOVE_FORWARD()

}

count ← count + 1

}