import pygame, sys from pygame.locals import * pygame.init() displaysurface = pygame.display.set_mode((300, 300)) object = pygame.rect((20,50), (50, 100)) mySurface = pygame.Surface((50, 50)) mySurface.fill((0,255,0)) mySurface2 = pygame.surface((100, 50)) mySurface2.fill((0,255,0)) while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.draw.rect(Surface, color, pygame.Rect(30, 30, 60, 60))