Programming 3 - Lesson 6

Programming 3 - Lesson 6

11th Grade

16 Qs

quiz-placeholder

Similar activities

Computer Basics

Computer Basics

KG - 12th Grade

21 Qs

App Development

App Development

1st - 12th Grade

17 Qs

Excel Functions and Formulas

Excel Functions and Formulas

8th - 12th Grade

20 Qs

code.org CSP Unit 3 Review 20-21

code.org CSP Unit 3 Review 20-21

9th - 12th Grade

15 Qs

Computer Parts Quiz

Computer Parts Quiz

9th - 12th Grade

18 Qs

10. Pygame

10. Pygame

5th - 12th Grade

12 Qs

Input Devices

Input Devices

3rd - 12th Grade

18 Qs

Google Drawings

Google Drawings

3rd - 12th Grade

20 Qs

Programming 3 - Lesson 6

Programming 3 - Lesson 6

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Rachel FitzZaland

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the pygame.joystick.init() function?

To create a joystick object

To set the speed of the joystick

To initialize the joystick module and allow the program to detect controllers

To display the joystick on the screen

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the // operator do in Python?

Comments out code

Performs floor division (divides and rounds down to nearest integer)

Checks if a number is divisible by another

Divides two numbers and returns a floating point result

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What range of values does an analog stick on a controller typically return in Pygame?

0 to 100

0 to 255

-1 to 1

-100 to 100

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does clock.tick(60) do in a Pygame game loop?

Makes the game run for exactly 60 seconds

Limits the game to running at 60 frames per second

Creates a timer that counts to 60

Pauses the game for 60 milliseconds

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of pygame.joystick.get_count()?

Counts how many times a button is pressed

Returns the number of joystick objects

Initializes the joystick module

Sets the speed of the joystick

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the lesson, why did we use min() and max() functions when updating the robot's position?

To make the robot move at a minimum or maximum speed

To keep the robot within the screen boundaries

To determine the minimum and maximum positions of the controller

To calculate the average position of the robot

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does git push -u origin main do?

Creates a new branch called main

Pulls changes from the remote repository

Initializes the main branch

Pushes local commits to the remote repository and sets it as the upstream branch

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?