
Pygame 5q
Authored by Динара Тлеккабылова
Computers
12th Grade
Used 1+ times

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.
OPEN ENDED QUESTION
3 mins • 1 pt
Write a line of Python code to create a game window with a height of 600px, a width of 800px.
Evaluate responses using AI:
OFF
2.
OPEN ENDED QUESTION
3 mins • 1 pt
Fill in the blanks to create an empty ellipse with a green color with 50px margin from all sides.
import pygame
pygame.init()
surface = pygame.display.set_mode((400, 400))
pygame.draw.ellipse(surface, (0, 255, 0),_____________________________)
pygame.display.flip()
Evaluate responses using AI:
OFF
3.
OPEN ENDED QUESTION
3 mins • 1 pt
Write one line of code that will draw the given shape on the surface (screen size 600*400):
Evaluate responses using AI:
OFF
4.
OPEN ENDED QUESTION
3 mins • 1 pt
The program has the next code snippet:
x = 20
y = 100
k = 0
while k == 0:
screen.fill((255, 255, 255))
x += 3
if y < 120:
y += 4
pygame.draw.circle(screen, (0, 140, 145), (x, y), 20)
Determine the position of the circle after 4 iteration.
x = ………………………………………….
y = ………………………………………….
Evaluate responses using AI:
OFF
5.
OPEN ENDED QUESTION
3 mins • 1 pt
The program has the next code snippet:
1. surface = pygame.display.set_mode((500, 500))
2. clock = pygame.time.Clock()
3. x = 50
4. y = 50
5. m = 2
6. run = True
7. while run:
8. for event in pygame.event.get():
9. if event.type == pygame.QUIT:
10. run = False
11. clock.tick(30)
12. if x >= 750 or y >= 450:
13. m *= -1
14. x += m
15. y += m
16. surface.fill((255, 255, 255))
17. pygame.draw.circle(surface, (255, 255, 0), (x, y), 50)
18. pygame.display.update()
Explain line 2 and 11.
Evaluate responses using AI:
OFF
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
JSPS Competition Hackathon - Scratch Language - Grade 1
Quiz
•
2nd Grade - University
10 questions
BIOS - UEFI - CONFIGURACION
Quiz
•
1st - 12th Grade
10 questions
Primer parcial
Quiz
•
12th Grade
10 questions
CURSO BASICO SIART
Quiz
•
12th Grade
10 questions
Elements of Programming Test
Quiz
•
12th Grade
10 questions
Tin học 10 _ Bài 16 _Định dạng văn bản
Quiz
•
10th - 12th Grade
10 questions
Cuestionario sobre Píxeles
Quiz
•
5th Grade - University
10 questions
Embed System#2
Quiz
•
10th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade