TORONTO KIDS COMPUTER CLUB | Tuesday Python Homework 18:30 – 22.01.25.
20272
post-template-default,single,single-post,postid-20272,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

Tuesday Python Homework 18:30 – 22.01.25.

29 Jan Tuesday Python Homework 18:30 – 22.01.25.

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.