Solving a challenge
The solution can be found in bouncing.py
To execute it, one must import all from bouncing.py and call the function bouncing, passing to it a float higher than zero and lesser than one in a python 3 environment.
For example, for an desired percentage of 50%, just call: bouncing(.5)