wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CODE.ORG: Mbeyeah: Lesson 12: THE DRAW LOOP ASSESSMENT

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

What is the main purpose of the draw loop?

a)

To create sprites

b)

To repeat code continuously

c)

To stop programs

d)

To delete variables

2.

How many times does the draw loop run?

a)

Once

b)

Twice

c)

Continuously

d)

Only when clicked

3.

Code inside the draw loop runs:

a)

Only at the start

b)

One time per program

c)

Repeatedly while the program runs

d)

Only when a key is pressed

4.

What happens when sprite.x = sprite.x + 1 is placed in the draw loop?

a)

The sprite disappears

b)

The sprite moves left

c)

The sprite moves right continuously

d)

The sprite stops moving

5.

Which type of program usually needs a draw loop?

a)

Static images

b)

Animations and games

c)

Text documents

d)

Calculators

6.

What is a frame in animation?

a)

A. A picture on the wall

b)

B. One screen update

c)

C. A variable

d)

D. A loop

7.

Why does animation look smooth?

4 lines
8.

Where should movement code be placed?

a)

Outside the program

b)

Inside the draw loop

c)

In comments

d)

In setup only

9.

What happens if the draw loop is removed?

a)

The program crashes

b)

The animation stops updating

c)

Sprites multiply

d)

The screen flashes

10.

What does repeated code create visually?

a)

Static images

b)

Movement

c)

Errors

d)

Comments

11.

Which property change causes movement?

a)

color

b)

x or y

c)

name

d)

text

12.

The draw loop updates the screen about how often?

a)

Once per minute

b)

Once per hour

c)

Many times per second

d)

Only when clicked

13.

What happens if a sprite’s size increases inside the draw loop?

a)

It stays the same

b)

It grows continuously

c)

It disappears

d)

It stops the program

14.

What is program flow?

4 lines
15.

Which best describes the draw loop?

a)

Conditional

b)

Repeating

c)

Random

d)

Permanent

16.

Why is the draw loop important for games?

a)

It saves memory

b)

It allows real-time updates

c)

It deletes errors

d)

It creates variables

17.

17. Code outside the draw loop runs:

a)

Continuously

b)

Randomly

c)

Once at the start

d)

Every frame

18.

What happens if no properties change in the draw loop?

a)

The program ends

b)

Nothing appears to move

c)

Sprites duplicate

d)

Errors appear

19.

Which word best describes animation?

a)

Static

b)

Repeated movement

c)

Broken

d)

Silent

20.

Why do programmers use loops?

a)

To slow programs

b)

To repeat actions efficiently

c)

To remove sprites

d)

To stop animation