Python Pygame

Python Pygame

12th Grade

20 Qs

quiz-placeholder

Similar activities

business 1.4 revision

business 1.4 revision

KG - Professional Development

20 Qs

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

tik kelas 7

tik kelas 7

1st Grade - University

15 Qs

Digital Icons

Digital Icons

12th Grade - University

16 Qs

Visual Basic Assessment

Visual Basic Assessment

11th - 12th Grade

21 Qs

Dasar Desain Grafis

Dasar Desain Grafis

12th Grade - University

15 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

CORLANG Week6-7

CORLANG Week6-7

10th Grade - University

20 Qs

Python Pygame

Python Pygame

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Wayground Content

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

left, middle, right = pygame.mouse.get_pressed()

if left:

    print("Left Mouse Key is being pressed")

The above code, as long as the mouse is being held down, it will keep printing

Returns the coordinates of the mouse cursor on the screen

The above code changes the type of cursor that appears on the screen

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do?

color = (random.randint(0,255), random.randint(0,255), random.randint(0,255))

choose a random color

fill the surface with random color

change the background color according to the key pressed

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do I update the screen?

import pygame

pygame.init()

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

pygame.display.flip()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Set image background

bg1 = pygame.image.load("back1.jpg")

surface.blit(bg1, (0, 0))

bg1 = pygame.image.load("back1.jpg")

surface = pygame.display.set_mode((800,500))

bg1 = pygame.image.load("back1.jpg")

pygame.display.set_caption("Animation")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do?

if x >= 500: x = 0

        x += 3

    surface.fill((255, 255, 255))

      circle = pygame.draw.circle(surface, (0, 0, 255), (x, y), 15)

    pygame.display.update()

move the circle to right

create a surface

set initial position of the circle

check whether the circle pos. reached at the end

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do I import the pygame library?

import pygame

pygame.init()

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

pygame.display.flip()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is this function following the code?

event.button = 3

pressing the left button

pressing the right button

scrolling forward

scrolling back

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?