import pygame import sys SCREEN = pygame.Rect(0, 0, 400, 400) FPS = 30 WHITE = (255, 255, 255) def main(): pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode(SCREEN.size) ball = pygame.image.load('ball.png') ball_width = ball.get_size()[0] ball_height = ball.get_size()[1] bal…