wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Cookiesnitch

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which line in the code creates a variable that tracks the player’s score?

a)

speed = 5

b)

count = 0

c)

score = text(count,550,1000,'orange',75)

d)

toy = stamp('flying cookie',70,move)

2.

What is the purpose of the drag() function?

a)

To make the bat move

b)

To let the player move the toy by dragging it

c)

To increase the game speed

d)

To detect collisions

3.

What does the variable speed most likely control in the game?

a)

How fast the toy rotates

b)

How quickly the bat moves toward the player

c)

The number of points per cookie

d)

How fast the score updates

4.

Which function is called repeatedly to keep the game running?

a)

drag()

b)

lose()

c)

loop()

d)

gotcha()

5.

What event triggers the gotcha() function?

a)

When the bat moves off the screen

b)

When the toy is dragged

c)

When the bat hits the toy

d)

When the score reaches 20

6.

What happens inside the gotcha() function?

a)

The game ends

b)

The cookie changes, the score increases, and speed gets faster

c)

The bat resets to the top of the screen

d)

The toy disappears permanently

7.

Which of the following is an example of a conditional statement in the code?

a)

speed = speed + 10

b)

count = count + 1

c)

if (net.hits(toy)){ gotcha() }

d)

toy.pop()

8.

What is the purpose of the lose() function?

a)

To increase the bat’s speed

b)

To change the cookie image

c)

To stop the game when the bat hits the player

d)

To drag the toy

9.

What happens when the bat hits the toy in the game?

a)

The game ends

b)

The score increases and the speed gets faster

c)

The bat disappears

d)

The toy changes color

10.

Which code action demonstrates a variable updating?

a)

toy.rotate()

b)

count = count + 1

c)

bat.move(DOWN,70)

d)

sound('vii laugh')

11.

What does the "900" do in this line of code? stamp('dolphin',50,400,900)

a)

places the dolphin at x=400

b)

makes the dolphin 900 pixels tall

c)

places the dolphin at y=400

d)

makes 400 dolphins

12.

What are conditional statements and how are they used?

a)

Conditional statements are used to determine the weather conditions in a given location.

b)

Conditional statements are used to execute different blocks of code based on certain conditions in programming.

c)

Conditional statements are used to cook different types of food based on the recipe.

d)

Conditional statements are used to predict the stock market trends accurately.

13.

Explain the '==' comparison operator in programming.

a)

The '==' comparison operator checks for inequality without considering data types.

b)

The '==' comparison operator only works with numerical values.

c)

The '==' comparison operator converts data types before checking for equality.

d)

The '==' comparison operator checks for equality without considering data types.

14.

What is a statement that helps to reduce the redundancy within a program?

a)

Loop

b)

Constant

c)

Speed

d)

Blank lines

15.

What term describes redundancy in coding that occurs when lines of code or functions are unnecessarily repeated?

a)

Abstraction

b)

Redundancy

c)

Constant

d)

Speed

16.

What measures how fast a sprite moves on the screen/canvas in milliseconds?

a)

Speed

b)

Loop

c)

Abstraction

d)

Redundancy

17.

What is used to make code easier to read?

a)

Loops

b)

Blank lines

c)

Constants

d)

Speed

18.

What command starts counting the time as soon as the "play" button is clicked?

a)

Delay command

b)

Loop

c)

Speed

d)

Constant

19.

What command adds a sound file to the game found in the library?

a)

Tap command

b)

Sound command

c)

Delay command

d)

Loop

20.

What does the "900" do in this line of code? stamp('dolphin',50,400,900)

a)

places the dolphin at x=400

b)

makes the dolphin 900 pixels tall

c)

places the dolphin at y=400

d)

makes 400 dolphins