Search Header Logo

Day 6 Pygame - 1st July

Authored by Coding Department

Computers

Professional Development

Used 1+ times

Day 6 Pygame - 1st July
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does random.randint(0, 300) do?

Returns a float between 0 and 300

Returns an error

Returns a random integer from 0 to 299

Returns a random integer between 0 and 300 (inclusive)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the most common use of collision detection in a game?

To play background music

To detect if the player pressed a key

To detect if the player hits an enemy or collects an item

To start the game loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code if ball.colliderect(player_rect):, what happens when the condition is True?

A new ball is added

The player moves faster

A collision is detected and the ball is removed

The screen changes color

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which shape does pygame.draw.ellipse() draw in the given example?

A triangle

A circle/oval (ellipse)

A rectangle

A line

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of checking ball.y > HEIGHT in the game loop?

To reverse the ball's direction

To add gravity

To remove the ball if it leaves the screen

To increase the ball's speed

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?