import pygame import sys # Initialize Pygame pygame.init() # Set the width and height of the screen width, height = 600, 400 screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("Moz: Basketball and Watermelon") # Define colors WHITE = (255, 255, 255) BLACK = (0, 0, 0) GREEN = (0, 128, 0) ORANGE = (255, 105, 0) RED = (255, 0, 0) # Fill the screen with white screen.fill(WHITE) # Draw Moz's body pygame.draw.circle(screen, BLACK, (300, 200), 50) # Head pygame.draw.rect(screen, BLACK, (275, 250, 50, 100)) # Body pygame.draw.line(screen, BLACK, (275, 250), (225, 325), 5) # Left arm pygame.draw.line(screen, BLACK, (325, 250), (375, 325), 5) # Right arm pygame.draw.line(screen, BLACK, (300, 350), (250, 400), 5) # Left leg pygame.draw.line(screen, BLACK, (300, 350), (350, 400), 5) # Right leg # Draw basketball pygame.draw.circle(screen, ORANGE, (450, 100), 30) pygame.draw.circle(screen, BLACK, (450, 100), 30, 2) # Draw watermelon pygame.draw.ellipse(screen, GREEN, (100, 250, 200, 100)) pygame.draw.rect(screen, GREEN, (150, 275, 100, 50)) pygame.draw.polygon(screen, RED, [(200, 250), (150, 300), (250, 300)]) # Update the display pygame.display.flip() # Main loop while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit()