See Inside.
You can use this without credit. This originally was a Python 3 script to help me on problem 95 of my math homework. See inside to see the script.