Python Pygame

Python Pygame

Assessment

Flashcard

Computers

12th Grade

Hard

Created by

Dinara Abdrakhmanova

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

FLASHCARD QUESTION

Front

How do I import the pygame library?

Back

import pygame

2.

FLASHCARD QUESTION

Front

How do I initialize the pygame?

Back

pygame.init()

3.

FLASHCARD QUESTION

Front

How do I initialize the surface? Options: import pygame, pygame.init(), surface = pygame.display.set_mode((400,300)), pygame.display.flip()

Back

surface = pygame.display.set_mode((400,300))

4.

FLASHCARD QUESTION

Front

How do I update the screen?

Back

pygame.display.flip()

5.

FLASHCARD QUESTION

Front

What does display.flip() do?

Back

will update the contents of the entire display

6.

FLASHCARD QUESTION

Front

What does display.update() do?

Back

allows to update a portion of the screen, instead of the entire area of the screen

7.

FLASHCARD QUESTION

Front

How can I check for an event if a user has pushed any event in the queue?

Back

run = True
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?

Discover more resources for Computers