Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python L2- Quiz 4

Total questions: 6

Worksheet time: 3mins

Name
Class
Date
1.

Why do we use comments when writing code?

a)

To make a function run the correct way

b)

Command the code to run a certain way

c)

To label and explain what the code is doing

d)

To remove code we do not want to use

2.

How do we add a title to the window of pygame?

a)

pygame.display.set_caption("Title")

b)

pygame.display.title = "Title"

c)

screen.set_caption("Title")

d)

screen.set_title("Title")

3.

pygame.display.set_mode(...) changes what?

a)

Size of the window

b)

Window input events

c)

Window exit condition

d)

Dark mode or Light mode

4.

pygame.init() is necessary at the beginning of a pygame function

a)

True

b)

False

5.

pygame.QUIT and pygame.MOUSEBUTTONDOWN are types of:

a)

events

b)

return variables

c)

functions

d)

classes

6.

pygame.Rect and pygame.draw.rect do the same thing

a)

True

b)

False