Font size
WorksheetsCODE.ORG: Mbeyeah: Lesson 12: THE DRAW LOOP ASSESSMENT
Total questions: 20
Worksheet time: 15mins
What is the main purpose of the draw loop?
To create sprites
To repeat code continuously
To stop programs
To delete variables
How many times does the draw loop run?
Once
Twice
Continuously
Only when clicked
Code inside the draw loop runs:
Only at the start
One time per program
Repeatedly while the program runs
Only when a key is pressed
What happens when sprite.x = sprite.x + 1 is placed in the draw loop?
The sprite disappears
The sprite moves left
The sprite moves right continuously
The sprite stops moving
Which type of program usually needs a draw loop?
Static images
Animations and games
Text documents
Calculators
What is a frame in animation?
A. A picture on the wall
B. One screen update
C. A variable
D. A loop
Why does animation look smooth?
Where should movement code be placed?
Outside the program
Inside the draw loop
In comments
In setup only
What happens if the draw loop is removed?
The program crashes
The animation stops updating
Sprites multiply
The screen flashes
What does repeated code create visually?
Static images
Movement
Errors
Comments
Which property change causes movement?
color
x or y
name
text
The draw loop updates the screen about how often?
Once per minute
Once per hour
Many times per second
Only when clicked
What happens if a sprite’s size increases inside the draw loop?
It stays the same
It grows continuously
It disappears
It stops the program
What is program flow?
Which best describes the draw loop?
Conditional
Repeating
Random
Permanent
Why is the draw loop important for games?
It saves memory
It allows real-time updates
It deletes errors
It creates variables
17. Code outside the draw loop runs:
Continuously
Randomly
Once at the start
Every frame
What happens if no properties change in the draw loop?
The program ends
Nothing appears to move
Sprites duplicate
Errors appear
Which word best describes animation?
Static
Repeated movement
Broken
Silent
Why do programmers use loops?
To slow programs
To repeat actions efficiently
To remove sprites
To stop animation
