''' In the previous exercise, you made the ball move over the screen, but the code was written in such a way that the ball moved from left to right, then stopped at the end of the graphical window. When simulating a less regulated movement of a ball, the path is less predictable or even unpredictable, so containing the ball inside the graphical window should be programmed in a different way. **Exercise A:** The algorithm for bouncing is very simple: when the ball reaches the top or bottom border of the graphical window, change the sign of the displacement in vertical direction (`dY = -dY`). When the ball bounces to the left or right side of the window, change the sign of the horizontal displacement (`dX`). Write a Python program in which a ball moves in a diagonal line at constant speed and bounces when it reaches one of the borders of the graphical window. The ball should keep moving until the graphical window is closed. Try different angles of movement. **Exercise B:** Extend your code from exercise A such that it simulates the bouncing of a ball in the presence of gravity: decrease the ball displacement in the vertical direction when the ball is moving upwards, and increase the ball displacement in the vertical direction when the ball is moving downwards by subtracting a small value from `dY` (e.g., `dY = dY - 0.1`). If the ball bounces higher each step, adjust the program so that the peaks are lower each time the ball bounces. '''