Show this to your *nice* math teacher!

How this works

First you input the numerator and denominator of the fraction one by one. The program then calculates the HCF/GCD of the numerator and denominator and divides the numerator and denominator by that. The result is the simplified numerator and denominator. It is then outputted.

Note and Credits

This program was made with help from @RohilPatel so I hope you don't get angry cause of the title. It was also made with help from @maxyang and @fuzzyastrocat.

How I got the help

Basically in the post "Show this to your mean math teacher" I asked how to create a fraction simplifier cause I had been stuck for a loooooong time. I got an answer from @fuzzyastrocat, @RohilPatel, and @maxyang. They really helped me by giving ideas, and so I got to finish this calculator.

Another Note

I would make this prettier using HTML, CSS, and JavaScript but I am still in the process of learning HTML, CSS, and JavaScript. In another 3-4 months I will be done and I will try to make this more pretty. Also, can you even add python code in a HTML page?

I don't wanna ask you to upvote as it sounds like begging for cycles. But upvote if you liked this?

You are viewing a single comment. View All

Sorry for not answering your question. PHP is basically a plugin to HTML, you insert the PHP code into an HTML file, but make the extension .php so the webserver knows to run the specific code. You also have to keep in mind that if you use PHP to select the PHP Web Server language from But I guess that's not the point. Check out w3schools' tutorial for more information, but if you don't plan on using it then that's fine! I'll make the JS version :) @Whippingdot