function for drawing rectangle to screen python code example Example: pygame.draw.rect pygame.draw.rect(surface, color, rect)