I got it working!(I used silly variable names since I was frustrated with this– you can see it in the video!)

Here is the code with some commenting:

FractionCode