Search Header Logo

Day 1 Pygame - 23rd June

Authored by Coding Department

Computers

Professional Development

Used 1+ times

Day 1 Pygame - 23rd June
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does pygame.init() do?

Starts the game loop

Draws shapes on the screen

Initializes all the Pygame modules

Creates the game window

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of pygame.display.set_mode((width, height))?

Set the frame rate

Play background music

Set the title of the window

Create a window of specific width and height

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does pygame.display.set_caption("Game Title") do?

Sets the window size

Shows the title in the window’s title bar

Starts the game loop

Displays text on the screen

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of the game loop (while run:)?

To initialize the screen

To draw only one frame

To keep checking for input and updating the game until quit

To close the game

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which event type is triggered when the user clicks the close (X) button on the window?

pygame.KEYDOWN

pygame.MOUSEBUTTONDOWN

pygame.QUIT

pygame.CLOSEWINDOW

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to check for user input events like key presses or mouse clicks?

pygame.get_events()

pygame.handle_events()

pygame.event.get()

pygame.read.input()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of pygame.display.update() in the game loop?

Initializes the display

Quits the game

Updates the game title

Makes drawing and screen changes visible

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?