I am super new to programming. This is what my professor want me to do: Create an animation where a ball is moving inside the display window whose speed gradually slows down. When somebody click the mouse, this ball will be set with a new random speed and move again (will gradually stop again). The ball will bounce if it hits the boundary of the window.
I can't figure out how to get the ball to reset with a new speed.