TORONTO KIDS COMPUTER CLUB | PMCA Sunday 14:00 Python Homework 21.06.27.
post-template-default,single,single-post,postid-19679,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

PMCA Sunday 14:00 Python Homework 21.06.27.

29 Jun PMCA Sunday 14:00 Python Homework 21.06.27.

Similar to the code we did in the last class, draw the below pattern using pygame

In the above example, the radius of the circle is 40px. The height of the screen is 480px and the width of the screen is 640px. In your code, please select the appropriate radius so that the screen height and screen width are easily divisible by radius.

import pygame, sys, random


screen_height = 480
screen_width = 640
screen=pygame.display.set_mode([screen_width, screen_height])
screen.fill([150,222,232]), [200,100,80], [180,200], 100)

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
No Comments

Sorry, the comment form is closed at this time.