wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

code.org CSP Unit 3 Review 20-21

Total questions: 15

Worksheet time: 12mins

Name
Class
Date
1.

The program above is run. Then the user clicks the "blueButton" button ONCE. What will be displayed in the console?

a)

"1"

"2"

"3"

b)

"1"

"3"

c)

"2"

"1"

"3"

d)

"1"

"3"

"2"

2.

What color is blueButton after the code above runs?

a)

blue

b)

red

c)

green

d)

yellow

3.

What color is redButton after the code above runs?

a)

blue

b)

red

c)

green

d)

yellow

4.

The program above is run. What color is blueButton if the user DOES NOT click blueButton?

a)

blue

b)

red

c)

green

d)

yellow

5.

The program above is run. What color is blueButton if the user clicks blueButton once?

a)

blue

b)

red

c)

green

d)

yellow

6.

The following program is run. Then the user clicks the "redButton" ONCE and then clicks the "blueButton" ONCE. What will be displayed in the console?

a)

"1"

"3"

"5"

"2"

"4"

b)

"2"

"4"

c)

"1"

"3"

"5"

"4"

"2"

d)

"4"

"2"

e)

"1"

"2"

"3"

"4"

"5"

7.

Any programming language that lets users create programs by manipulating “blocks” or graphical programming elements, rather than writing code using text.

a)

Command

b)

Run Program

c)

Algorithm

d)

Block-based programming language

8.

A sequence of steps written in a programming language that can be followed to solve a problem, especially by a computer.

a)

Debug

b)

Event

c)

Algorithm

d)

Computer Program

9.

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

a)

onEvent

b)

Bug

c)

Moth

d)

Fly in the Ointment

10.

Statements that should only run upon a specific user action should be placed

a)

inside an onAction block

b)

below an onEvent command

c)

after the first programming statement

d)

within an onEvent programming statement

11.

Finding and fixing problems in an algorithm or program

a)

Debugging

b)

Event Driven Programming

c)

Run Programs

d)

Algorithms

12.

Cause the computer to execute the commands you've written in your program

a)

console.log

b)

Run Program

c)

Debug

d)

onEvent

13.

A single instruction for the computer. Put many together and you get algorithms and computer programs.

a)

Algorithm

b)

onEvent

c)

console.log

d)

Program statement

14.

When the user hovers their mouse over the hawk,

a)

both birds will appear only in the middle of the screen

b)

the sparrow will be confined to the upper right and the hawk to the upper left

c)

the sparrow will be confined to the lower right and the hawk to the upper left

d)

the sparrow will be confined to the lower left and the hawk to the upper right

15.

Choose all the correct options. When debugging, you should

a)

run the program over and over, staring really hard at it

b)

add some console.log statements to see what is going on

c)

describe your program and the odd behavior to a friend

d)

reduce the amount of code and see if the behavior improves