wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Interactive Games & Animations Quiz

Total questions: 55

Worksheet time: 55mins

Name
Class
Date
1.

A part of a program that does not work correctly.

a)

Bug

b)

Debugging

c)

Program

d)

Variable

2.

Finding and fixing problems in an algorithm or a program.

a)

Bug

b)

Debugging

c)

Variable

d)

Parameter

3.

An algorithm that has been coded into a form that can be run by a machine.

a)

Bug

b)

Debugging

c)

Program

d)

Parameter

4.

An extra piece of information passed to a function to customize it for a specific need.

a)

Bug

b)

Program

c)

Parameter

d)

Variable

5.

A placeholder for information that can change.

a)

Program

b)

Parameter

c)

Variable

d)

Debugging

6.

A graphic character on the screen with properties that describe its location, movement, and appearance.

a)

Animation

b)

Sprite

7.

A series of images that create the illusion of motion by being shown rapidly one after another.

a)

Animation

b)

Sprite

8.

How are shapes displayed on the screen?

a)

with alphabet letters

b)

with X and Y coordinates

c)

using a touch screen

d)

with width and height values

9.

What is the origin of a square or a rectangle?

a)

The bottom right corner

b)

The bottom left corner

c)

The top right corner

d)

The top left corner

10.

What is the origin of a circle or an ellipse?

a)

The bottom left corner

b)

The center

c)

The bottom right corner

d)

The top

11.

In this line of code:

rect(250, 100);

Which number is the y value?

a)

rect

b)

250

c)

100

12.

In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?

a)

The x and y values

b)

The w and h values

13.

Which command matches this block of code?

a)

Draws an ellipse while keeping the height-to-width ratio the same.

b)

Shrinks or grows a sprite while keeping the height-to-width ratio the same.

c)

Draws a rectangle while keeping the height-to-width ratio the same.

14.

In which direction will the sprite move?

bee.y = bee.y + 2

a)

left

b)

right

c)

up

d)

down

15.

Which sprite property would you change to move the sprite from left to right?

a)

sprite.x

b)

sprite.y

c)

sprite.scale

d)

sprite.rotation

16.

Which sprite property would you change to make the sprite turn in a circle?

a)

sprite.x

b)

sprite.y

c)

sprite.scale

d)

sprite.rotation

17.

The program below attempts to draw a crab with a blue background. What change needs to be made so that it works correctly?

a)

Move background("blue"); to the end of the program.

b)

Move drawSprites(); to the end of the program.

c)

Rename the variable sprite to crab.

d)

No change, the program already works.

18.

Describe what will happen in the following program.

a)

When the right mouse button is pressed, the sprite moves to the right. When the left arrow key is pressed, it rotates.

b)

When the left mouse button is pressed, the sprite rotates. When the right arrow key is pressed, it moves to the right.

c)

When both the left mouse button and right arrow key are pressed, the sprite rotates and moves to the right.

d)

When the left mouse button is pressed, the sprite rotates. When the right arrow key is pressed, it moves to the right. When the left arrow key is pressed, it moves to the left.

19.

Which program will draw the image below?

a)

b)

c)

d)

20.

Consider the following program. What will be the value of score at the end of this program?

a)

0

b)

1

c)

5

d)

6

21.

Match each line of code with its explanation.

a)
  • fries.scale = 0.6;

1.
  • Set the scale of the fries sprite to 0.6

b)
  • fries.x = 100;

2.
  • Move the x position of the fries sprite

c)
  • fries.y = 50;

3.
  • Move the y position of the fries sprite

d)
  • fries.rotation = 45;

4.
  • Rotate the fries sprite.

22.
Question Image

MatcMatch each parameter of the rect() block with it's purpose: rect(parameter1, parameter2, parameter3, paramter4);
Hint: the following program draws the scene on the right.

a)
  • parameter1

1.

x

b)
  • parameter2

2.

y

c)
  • parameter3

3.

width

d)
  • parameter4

4.

height

23.

What is the correct way to change the background color to green in the program below?

a)

background("green");

b)

setBackground("green");

c)

changeBackground("green");

d)

bgColor = "green";

24.

How can you make the sprite rotate continuously in the draw loop?

a)

sprite.rotation = sprite.rotation + 1;

b)

sprite.rotateContinuously();

25.

Which line of code would you add to make the square move to the left?

a)

square.x = square.x - 2;

b)

square.x = square.x + 2;

c)

square.moveLeft();

d)

square.moveRight();

26.

How can you make the sprite grow continuously in the draw loop?

a)

sprite.scale = sprite.scale + 0.01;

b)

sprite.grow();

c)

sprite.scale = sprite.scale - 0.01;

d)

sprite.growContinuously();

27.

Which keyboard key do you need to press to move the sprite?

a)

x

b)

y

c)

up arrow

d)

space

28.

Which line of code creates a sprite?

a)

Line 1

b)

Line 2

c)

Line 8

d)

Line 9

29.

Match the code with the output

a)
b)
c)
30.

What will happen when this code is run?

a)

The balloon will move down if the down arrow is pressed; otherwise, it will move up.

b)

The balloon will move up if the up arrow is pressed; otherwise, it will move down.

c)

The balloon will move down if the mouse is down; otherwise, it will move up.

d)

The balloon will move up if the mouse is down; otherwise, it will move down.

31.

Match the code to the correct direction the sprite will move using the keyboard.

a)

1.

Move Up

b)

2.

Move Down

c)

3.

Move Left

d)

4.

Move Right

32.

Predict what will be shown in the console.log statements.

a)

true true true

b)

true false false

c)

false false false

d)

true false true

33.

In the draw loop, what happens if you call the text function before the drawSprites and/or background functions?

a)

You won't be able to see your text because the sprites and background will be drawn on top of the text.

b)

You will be able to see your text because Game Lab knows you want to see the text.

c)

You won't be able to see your sprites or background because order doesn't matter.

d)

You will be able to see your text because the sprites and the background will be drawn after the text.

34.

Boolean Expression

a)

A single image within an animation.

b)

A single value of either TRUE or FALSE.

c)

A piece of code that you can easily call over and over again.

d)

Finding and fixing problems in your algorithm or program.

35.

Conditionals

a)

Any valid unit of code that resolves to a value.

b)

A single image within an animation.

c)

Statements that only run under certain conditions.

d)

Any valid unit of code that resolves to a value.

36.

If-Statement

a)

The common programming structure that implements "conditional statements".

b)

Attributes that describe an object's characteristics.

c)

An algorithm that has been coded into something that can be run by a machine.

d)

Part of a program that does not work correctly.

37.

Which key moves the player to the right?

a)

The left arrow key

b)

The right arrow key

c)

Neither

38.

Is the boolean expression on line 14 currently true or false?

a)

True

b)

False

39.

Oh no! This code is all messed up! Read the code carefully. Which direction will the sprite go if the up arrow key is pressed?

a)

Up

b)

Down

c)

Left

d)

Right

40.

Oh no! This code is all messed up! Read the code carefully. Which direction will the sprite move if the down arrow is pressed?

a)

Up

b)

Down

c)

Left

d)

Right

41.

Which of these increases the values of clicks when the space key has been released?

a)
b)
c)
d)
42.

The ellipse block will plot a circle at the x and y coordinates it is given.

What is this line of code?

a)

ellipse

b)

rect

43.

The _ block plots a square at the x and y coordinates it is given.

a)

ellipse

b)

rect

c)

fill

d)

background

44.

Labels cannot contain spaces.

a)

True

b)

False

45.

Labels cannot begin with a number.

a)

True

b)

False

46.

Labels are not case sensitive.

a)

True

b)

False

47.

The rate at which frames in an animation are displayed, typically measured in frames per second.

a)

property

b)

frame

c)

frame rate

d)

animation

48.

The common programming structure that implements "conditional statements" is:

a)

If-Statement

b)

Boolean Expression

c)

Boolean

49.

A generic term for code that alters program flow based on true/false values (like an if statement).

a)

Program

b)

Conditional

50.

_ is a statement that evaluates to a Boolean value (either true or false).

a)

Sprite

b)

Boolean Expression

51.

In programming, an expression that evaluates to true or false.

a)

Boolean

b)

Boolean Expression

c)

Boolean Value

52.

Which line of code should you add to make the circle move upward?

a)

circle.y = circle.y - 2;

b)

circle.y = circle.y + 2;

c)

circle.moveUp();

d)

circle.moveDown();

53.

A student wants to make a sprite appear. The student begins with "var sprite = createSprite(200, 300)". What is the next step?

a)

Add a "drawSprites" command

b)

Add a "sprite.setAnimation" command

c)

Add a "sprite.x" command

d)

Add a "sprite.y" command

54.

Which command is necessary to make a sprite move across the screen from right to left?

a)

if then

b)

sprite.x = sprite.x + 2;

c)

sprite.x = sprite.x - 2;

d)

sprite.y = sprite.y + 2;

55.

Match the block code to the correct description.

a)

A plane moves up and a jet moves across the screen.

b)

A blue sky and two planes are created without motion.

c)

A plane moves across and a jet moves up.

d)

The plane and the jet move together across the screen.