wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 4 Review (AP CSP)

Total questions: 21

Worksheet time: 12mins

Name
Class
Date
1.

What does the following evaluate to?

!true

a)

true

b)

false

c)

false!

d)

!false

2.

This type of variable is temporary and can only be used where it was created.

a)

local

b)

global

c)

var

d)

universal

3.

What will output to the console?

a)

25

b)

50

c)

75

d)

100

e)

125

4.

What does the following evaluate to?

true || false

a)

true

b)

false

c)

not enough information

d)

true && false

5.

What will output to the console?

a)

"C"

b)

"hug"

c)

"D"

d)

"hawks"

6.

What will output to the console?

a)

"Hi!"

b)

"Bye!"

c)

"Hello!"

d)

"Hola!"

7.

What will output to the console?

a)

"hug"

b)

4

c)

100

d)

112

8.

On which line is a function being called?

(a)  

9.

What does the following evaluate to?

true && false

a)

true

b)

false

c)

not enough information

d)

true && false

10.

On which line is a function being declared/defined?

(a)  

11.

What does this return?

7%5

a)

2

b)

3

c)

5

d)

7

12.

What's the fancy word we use to combine Strings with other Strings, numbers, or other variables?

(a)  

13.

This type of variable is permanent and can be used anywhere in your code.

a)

local

b)

global

c)

var

d)

universal

14.

What will output to the console?

a)

"A"

b)

"a"

c)

"B"

d)

"b"

15.

What will output to the console?

a)

"apple"

b)

"grape"

c)

"Apple"

d)

"Grape"

16.

Which line will likely cause the program to not run correctly?

a)

line 1

b)

line 3

c)

line 4

d)

line 5

17.

What will output to the console log?

a)

"hawks"

b)

19

c)

"hug"

d)

35

18.

A variable is a name reference that can store one value at a time.

a)

true

b)

false

19.

What will output to the console?

a)

"Hi!"

b)

"Bye!"

c)

"Hola!"

d)

"Hello!"

20.

What does the following evaluate to?

false|| false

a)

true

b)

false

c)

not enough information

d)

true && false

21.

In which order will the output appear?

a)

"five" "six" "seven" "five" "six"

b)

"seven" "five" "six" "five" "five"

c)

"five" "six" "five" "six" "seven"

d)

"seven" "five" "six" "five" "six"