wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python Gaming L3

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

In the Race Car game, what does increasing the y position of the car typically do?

a)

Moves the car to the left

b)

Moves the car up

c)

Moves the car down

d)

Stops the car

2.

In Space Invaders, what happens when bullet_state is set to "fire"?

a)

A bullet is hidden

b)

The enemy moves faster

c)

A bullet is currently flying

d)

The player moves

3.

What is the best way to check collision between bullet and enemy?

a)

Using == between positions

b)

By checking their colors

c)

Using distance formula

d)

Using a for loop

4.

In both games, which Pygame function is used to handle events like key presses?

a)

pygame.keydown()

b)

pygame.event.get()

c)

pygame.screen.listen()

d)

pygame.check_input()

5.

In Race Car, which axis controls the car's left and right movement?

a)

Z-axis

b)

Y-axis

c)

X-axis

d)

W-axis

6.

What happens if you forget to call pygame.display.update() in the main game loop?

a)

Game crashes

b)

Nothing appears on the screen

c)

Only sound will play

d)

Player moves twice as fast

7.

What does this condition mean in Space Invaders? if enemy_y > 440: game_over = True

a)

Enemy is attacking

b)

Enemy escaped the screen

c)

Enemy touched the player zone

d)

Game is paused

8.

In both games, which loop is essential to keep the game running?

a)

for loop over enemies

b)

while True: loop

c)

if loop

d)

repeat until loop

9.

Which of the following is the correct state flow for a bullet in Space Invaders?

a)

"fire" → "ready" → "fire"

b)

"ready" → "fire" → "hit"

c)

"ready" → "fire" → "ready"

d)

"shoot" → "reload" → "ready"

10.

Why do we use screen.blit(playerImg, (player_x, player_y))?

a)

To load a sound

b)

To move the enemy

c)

To draw the player on the screen

d)

To update the score