wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP Units 1-5 Review

Total questions: 35

Worksheet time: 30mins

Name
Class
Date
1.

Which of the following best describes how computing devices represent information?

a)

A computer will either represent information as bits or bytes but not both

b)

A computer represents data as a byte which is either a 0 or a 1

c)

A computer represents data as bits which is either a 0 or a 1

d)

A computer represents information as bits which contain 8 bytes.

2.

Which of the following are true about how analog data is converted to digital data?

a)

The digital version is a representation of the analog, but cannot contain all of the details.

b)

To make the digital version be a more accurate representation of the analog data, the process should use fewer bits to represent each sample.

c)

A longer interval between measured samples means more details will be captured in the conversion from analog to digital.

d)

The digital version contains all of the details of the analog data, as long as enough storage capacity is available.

3.

How many bits are in two bytes of data?

a)

4

b)

8

c)

12

d)

16

4.

The binary number 1001 is equal to what in decimal?

a)

1,001

b)

17

c)

8

d)

9

5.

A computer program is using 4 bits to represent an integer. When the program adds the decimal numbers 10 and 6, the result is 0000. Which of the following describe the result? (Select all that apply)

a)

The number 16 in decimal is 0000 in binary.

b)

An overflow error occurred.

c)

a roundoff error occurred.

d)

You cannot represent the number 16 with 4 bits.

6.

ASCII is an abstraction because

a)

it allows the user to know the binary code for each character.

b)

the user can type letters and other characters without knowing the binary code assigned to them.

c)

it helps the user convert the decimal representation of a letter to the binary representation for the letter.

d)

the user can read a binary message and translate it into characters.

7.

What is the difference between Lossy and Lossless compression?

a)

With Lossy compression, none of the data is lost.

b)

With Lossless compression, a file cannot be decompressed to its original state.

c)

Lossless compression will usually reduce a file size less than Lossy compression.

d)

Lossy compression is reversible.

8.

A collection of interlinked web pages on the World Wide Web

a)

Heading

b)

Website

c)

Digital Footprint

d)

HTML

9.

Hypertext Markup Language, a language used to create web pages

a)

Website Content

b)

Website Structure

c)

Heading

d)

HTML

10.

The collection of information about an individual across multiple websites on the internet

a)

HTML Element

b)

Website Content

c)

Digital Footprint

d)

HTML Tag

11.

The inputs and outputs that allow a user to interact with a piece of software.

a)

Useful Interchange

b)

User Input

c)

User Interface

d)

User Intention

12.

Data that are sent to a computer for processing by a program.

a)

Output

b)

Screen

c)

Input

d)

User Interface

13.

Any data that are sent from a program to a device.

a)

Input

b)

Output

c)

Outdate

d)

Program

14.

What will the console log say when this program is run?

a)

"Starting my program!"

"You clicked the button!"

"Ending my program!"

b)

"Starting my program!"

"Ending my program!"

"You clicked the button!"

c)

"You clicked the button!"

"Starting my program!"

"Ending my program!"

d)

"You clicked the button!"

"Ending my program!"

"Starting my program!"

15.

After the program is run, what will the text color of smallButton be?

a)

red

b)

blue

c)

green

d)

yellow

16.

If the user clicks the button, what color will "topButton" be when the program finishes running?

a)

red

b)

green

c)

blue

d)

orange

17.

When this program is run, the user clicks "topButton" then "bottomButton" and then "topButton" again. What will be displayed in the console?

a)

aaa

bbb

ccc

aaa

b)

aaa

ccc

bbb

aaa

c)

ccc

aaa

bbb

aaa

d)

aaa

bbb

aaa

ccc

18.

What is output by line 6?

(a)  

19.

What is output by line 5?

(a)  

20.

What is output by the program?

a)

less than 10

b)

less than 20

c)

less than 30

d)

30 or more

21.

What is output by the program?

a)

Option A

b)

Option B

c)

Option C

d)

Option D

e)

Option E

22.

What will the value of bags be at the end of the program?

(a)  

23.
What is the correct order when debugging a program?
a)
Debug, Run, Test
b)
Run, Debug, Test
c)
Run, Test, Debug
d)
All of the options are correct.
24.

What are operators?

a)

numbers, strings, or booleans

b)

combination of operators and values that evaluate to a single value

c)

fancy name for addition, subtraction, multiplication, and division

d)

portion of the code and program that can hold a value

25.

What is a mod?

a)

refers to the remainder

b)

combination of operators and values that evaluate to a single value

c)

fancy name for addition, subtraction, multiplication, and division

d)

portion of the code and program that can hold a value

26.

Match the following.

a)

&&

1.

AND

b)

| |

2.

OR

c)

!

3.

NOT

27.

Thinking about truth tables, what does this set of logical operators evaluate to?

TRUE && FALSE

a)

True

b)

False

28.

Thinking about truth tables, what does this set of logical operators evaluate to?

TRUE | | FALSE

a)

True

b)

False

29.

Thinking about truth tables, what does this set of logical operators evaluate to?

! TRUE

a)

True

b)

False

30.

What is the value of 12 % 6?

a)

2

b)

0

c)

3

d)

1

31.

What type of variable is this?

a)

Not a variable

b)

variable with concatenation

c)

variable with counter pattern

d)

variable string

32.

Once this code is run, what is the value of tickets?

a)

68

b)

103

c)

35

d)

33

33.

What will be displayed after this code is run?

a)

You Lose!

b)

Perfect Game!

c)

You Win!

34.

To attend a particular camp, a student must be either at least 13 years old or in grade 9 or higher,

but must not yet be 18 years old.

Let age represent a student’s age and let grade represent the student’s grade level.

Which of the following expressions evaluates to true if the student is eligible to attend the camp and evaluates to false otherwise?

a)

((age ≥ 13) OR (grade ≥ 9)) AND (age ≤ 18)

b)

((age ≥ 13) OR (grade ≥ 9)) AND (age < 18)

c)

((age ≥ 13) OR (grade ≥ 9)) OR (age ≤ 18)

d)

((age ≥ 13) OR (grade ≥ 9)) OR (age < 18)

35.

Match the following

a)

15 % 3

1.

0

b)

5 % 3

2.

2

c)

16 % 3

3.

1

d)

13 % 8

4.

5