wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AP CSP Unit 3

Total questions: 15

Worksheet time: 9mins

Name
Class
Date
1.

The value that is assigned in any list is considered...

a)

Element

b)

Index

c)

String

d)

Integer

2.

Which statement about the script and two reporter blocks below is true?

a)

block A reports 5, block B reports "Joy Buolamwini"

b)

block A reports 10, block B reports "Joy Buolamwini"

c)

block A reports 5, block B reports [Joy, Buolamwini]

d)

block A reports 10, block B reports [Joy, Buolamwini]

3.

Which statement about the script and two reporter blocks below is true?

a)

block C reports "J", block D reports an error

b)

block C reports "Joy", block D reports 2

c)

block C reports "Joy", block D reports an error

d)

block C reports [Joy], block D reports 2

4.
What kind of data would we store in a "String" parameter?
a)
objects
b)
dates
c)
whole numbers
d)
text 
5.
A ________ is a sequence of characters. 
a)
string
b)
floating point number
c)
boolean
d)
snake
6.

What does append mean?

a)

add an element to the back of the list

b)

add an element to the front of the list

c)

remove an element from a list

d)

insert an element in the list

7.

What is an index?

a)

the postion number of an element in a list

b)

another name for an item in a list

8.

What element is in index 3?

a)

grape

b)

pineapple

c)

cherry

d)

strawberry

9.

What index is pineapple in?

a)

3

b)

grape

c)

pineapple

d)

4

10.

Which of the following is NOT a data type?

a)

number

b)

boolean

c)

command

d)

string

11.

Which of the following variables holds a true or false value?

a)

String

b)

int

c)

boolean

d)

float

12.

What will the following algorithm display?

a ← 13

a ← 17

a ← a+1

DISPLAY(a)

a)

13

b)

17

c)

18

d)

19

13.

An error in a program that prevents the program from running as expected

a)

onEvent

b)

Bug

c)

Moth

d)

Fly in the Ointment

14.

Kobe is working on a basketball game and is experimenting with the variables he'll use for the game. His code looks like this:

a)

1 0 3 3

b)

1 0 3 1

c)

1 0 3 4

d)

1 0 4 3

e)

1 0 1 3

15.
stores a piece of data, and gives it a specific name
a)
variable
b)
whitespace
c)
interpreter
d)
modulo