TORONTO KIDS COMPUTER CLUB | Aurora Monday 18:30 Python Homework 21.06.21.
19630
post-template-default,single,single-post,postid-19630,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Monday 18:30 Python Homework 21.06.21.

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()
No Comments

Sorry, the comment form is closed at this time.