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, 255, 0) BROWN = (139, 69, 19) ORANGE = (255, 140, 0) # Fill the screen with white screen.fill(WHITE) # Draw Moz's body (stick figure) head_radius = 20 body_height = 80 leg_length = 40 pygame.draw.circle(screen, BLACK, (width//2, height//2 - 100), head_radius) # Head pygame.draw.line(screen, BLACK, (width//2, height//2 - 80), (width//2, height//2 + body_height), 5) # Body pygame.draw.line(screen, BLACK, (width//2, height//2 + body_height), (width//2 - 30, height//2 + body_height + leg_length), 5) # Left leg pygame.draw.line(screen, BLACK, (width//2, height//2 + body_height), (width//2 + 30, height//2 + body_height + leg_length), 5) # Right leg # Draw the basketball basketball_radius = 15 pygame.draw.circle(screen, ORANGE, (width//2 + 40, height//2 - 50), basketball_radius) # Draw the watermelon watermelon_width = 80 watermelon_height = 60 pygame.draw.ellipse(screen, GREEN, (width//2 - watermelon_width//2, height//2 + 20, watermelon_width, watermelon_height)) pygame.draw.line(screen, BLACK, (width//2 - watermelon_width//2, height//2 + 20), (width//2 + watermelon_width//2, height//2 + 20), 2) # 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()