Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP Exam Review #1

Total questions: 12

Worksheet time: 11mins

Name
Class
Date
1.
What does HTTP stand for?
a)
Hyper Text Transfer Protocol
b)
Nothing, it's supposed to be HTML
c)
Head To This Page
d)
Hyper Tense Tall Penguins
2.

An Internet attack that causes a server to crash by making repeated requests to the same IP address:

a)

DDoS (Distributed Denial of Service)

b)

Cache Poisoning

c)

DNS (Domain Name System) Hijacking

d)

Phishing

3.
Given the following network diagram, what is the minimum number of connections that must be broken or removed before computer E can no longer communicate with computer B?
a)
1
b)
2
c)
3
d)
4
4.
Which of the following best describes the basic idea of fault tolerance?
a)
A system that never fails
b)
If part of the system fails, the operation continues without interruption
c)
A program that does not allow inputs out of a range given by a programmer
d)
A program that does not allow loss of precision
5.

Which of the following is a reason to use lossy compression?

a)

You want the compressed file to be larger than the original.

b)

You want the highest quality audio file possible, with no modifications.

c)

You want the highest quality image file possible, with no modifications.

d)

You want to save space and are not concerned if the file is the highest quality possible.

6.

Consider the following three binary numbers:

01010

010000

1110

Which of the following lists the numbers in order from least to greatest?

a)

010000

1110

01010


b)

01010

1110

010000


c)

01010

010000

1110


d)

1110

01010

010000


7.

For which of the following lists can a binary search be used to search for an item in the list?

a)

I only

b)

III only

c)

I and III only

d)

I, II, and III

8.

Assume that the two variables age and day have been initialized as shown below.


var age = 16;

var day = "Monday";


Determine if the following statement evaluates to true or false.


((age == 16) && (day == "Monday")) || (day == "Tuesday")

a)

true

b)

false

9.

What will the following algorithm display?
a  ←\leftarrow   13
b  ←\leftarrow   17
a  ←\leftarrow   a + 1
c  ←\leftarrow   a/7
DISPLAY(c)
DISPLAY(a)
DISPLAY(b)

a)

2, 14, 17

b)

13, 17, 5

c)

2, 12, 2

d)

14, 17, 2

10.

What will the following algorithm display?
a  ←\leftarrow   13
b  ←\leftarrow   17
a  ←\leftarrow   a + 1
c  ←\leftarrow   a/7
DISPLAY(c)
DISPLAY(a)
DISPLAY(b)

a)

2, 14, 17

b)

13, 17, 5

c)

2, 12, 2

d)

14, 17, 2

11.

What will the following algorithm display?

a ← 11

a ← a + 35

a ← a + 6

a ← a MOD 2

a ← a x b

DISPLAY (a)

a)

0

b)

42

c)

84

d)

126

12.

What is the percentage that this algorithm displays true?

DISPLAY(random(5,9) = 6)

a)

10

b)

20

c)

60

d)

100