# Homework 31, problem 3: two fills. # # Inside the game loop, call screen.fill twice before # pygame.display.flip(): first with red (255, 0, 0), then with blue # (0, 0, 255). Run it and observe what colour the background is, then # explain why in a comment. # # Run with: python exercises/31/homework/03-two-fills.py import pygame pygame.init() screen = pygame.display.set_mode((800, 600)) pygame.display.set_caption("Two Fills") clock = pygame.time.Clock() running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # TODO: replace this line with the two fills, then explain the result screen.fill((0, 0, 0)) pygame.display.flip() clock.tick(60) pygame.quit()