import pygame, sys pygame.init() display = pygame.display.set_mode((300,300)) display.fill((255,255,255)) # Drawing an ellipse on the display surface using Pygame's draw.ellipse() function. pygame.draw.ellipse(display, (0,0,255), pygame.Rect(40,80,200,80), width=0) # display: The surface to draw the ellipse on. # (0, 0, 255): The color of the ellipse in RGB format, here it represents blue color. # pygame.Rect(40, 80, 200, 80): The bounding rectangle for the ellipse. # It defines the position and dimensions of the ellipse. # The parameters represent (left, top, width, height) of the rectangle. # Here, the rectangle is positioned at (40, 80) with a width of 200 pixels # and a height of 80 pixels. # width=0: The width of the outline of the ellipse. # Setting it to 0 means that the ellipse will be filled with the specified color. while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() pygame.display.update()