import pygame import sys pygame.init () screen = pygame.display.set_mode((400, 300 )) surface = pygame.Surface ((50, 50)) surface.fill ((0, 0, 255)) while True: events = pygame.event.get () for event in events: if event.type == pygame.QUIT: pygame.quit () sys.quit () screen.blit (surface, (175, 125)) pygame.display.update ()