as playerobj['bounce'gets its value incrementedthe getbounceamount(function will return values that have the same bounce shape that the sine wave has from to if you want to make the bounce higherthan increase the bounceheight constant if you want to make the bounce slowerthan increase the bouncerate constant the sine function is concept from trigonometry mathematics if you' like to learn more about the sine wavethe wikipedia page has detailed informationbackwards compatibility with python version the reason we call float(to convert bouncerate to floating point number is simply so that this program will work in python version in python version the division operator will evaluate to floating point value even if both of the operands are integerslike thispython version howeverin python version the division operator will only evaluate to floating point value if one of the operands is also floating point value if both operands are integersthen python ' division operator will evaluate to an integer value (rounding down if needed)like thispython version but if we always convert one of the values to floating point value with the float(functionthen the division operator will evaluate to float value no matter which version of python runs this source code making these changes so that our code works with older versions of software is called backwards compatibility it is important to maintain backwards compatibilitybecause email questions to the authoral@inventwithpython com