# Homework 32 solution, problem 1: flag. # Run with: python exercises/32/homework/solutions/01-flag.py import pygame pygame.init() screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("Flag") clock = pygame.time.Clock() running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False screen.fill((255, 255, 255)) stripe_height = 600 // 3 pygame.draw.rect(screen, (0, 57, 166), (0, 0, 800, stripe_height)) pygame.draw.rect(screen, (255, 255, 255),(0, stripe_height, 800, stripe_height)) pygame.draw.rect(screen, (255, 0, 0), (0, stripe_height * 2, 800, stripe_height)) pygame.display.flip() clock.tick(60) pygame.quit()