23 Jun Aurora Monday 18:30 Python Homework 21.06.21.
Question:
Please use pygame to create the amination as following video, the circle will appear at the random location and will getting larger and larger then disappear, you can refer to the following coding:
import pygame, sys
import random as r
pygame.init()
screen = pygame.display.set_mode([640, 480])
screen.fill([255, 255, 255]) # RGB Color
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.display.quit()
sys.exit()
x = __________________
y = __________________
for i in range(1, 31):
pygame.time.delay(30)
screen.fill([255, 255, 255])
pygame.draw.circle(________________________)
pygame.display.flip()
Sorry, the comment form is closed at this time.