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