the terminate(function works the same as in the previous game programs the mathematics of the sine function def getbounceamount(currentbouncebounceratebounceheight) returns the number of pixels to offset based on the bounce larger bouncerate means slower bounce larger bounceheight means higher bounce currentbounce will always be less than bouncerate return int(math sin(math pi float(bouncerate)currentbounce bounceheight there is mathematical function (which is similar to functions in programming in that they both --return|or --evaluate|to number based on their parameterscalled sine (pronounced like --sign|and often abbreviated as --sin||you may have learned about it in math classbut if you haven' it will be explained here python has this mathematic function as python function in the math module you can pass an int or float value to math sin()and it will return float value that is called the --sine value|in the interactive shelllet' see what math sin(returns for some valuesimport math math sin( math sin( math sin( math sin( - math sin( - it seems really hard to predict what value math sin(is going to return based on what value we pass it (which might make you wonder what math sin(is useful forbut if we graph the sine values of the integers through on graphwe would get this