wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSP Unit 3

Total questions: 15

Worksheet time: 12mins

Name
Class
Date
1.

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

2.

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

3.

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

a)

onEvent

b)

Bug

c)

Moth

d)

Fly in the Ointment

4.

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

5.

Finding and fixing problems in an algorithm or program

a)

Debugging

b)

Event Driven Programming

c)

Run Programs

d)

Algorithms

6.

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

a)

console.log

b)

Run Program

c)

Debug

d)

onEvent

7.

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

a)

Algorithm

b)

onEvent

c)

console.log

d)

Command

8.

A set of steps you can follow in order to solve a problem or achieve a result often written down in regular spoken language.

a)

Debugging

b)

Event

c)

Algorithm

d)

Computer Program

9.

When the user hovers their mouse over the hawk, the

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

10.

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

11.

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"

12.

What color is blueButton after the code above runs?

a)

blue

b)

red

c)

green

d)

yellow

13.

What color is redButton after the code above runs?

a)

blue

b)

red

c)

green

d)

yellow

14.

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

a)

blue

b)

red

c)

green

d)

yellow

15.

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!"