lukew3 / mathgenerator

A math problem generator, created for the purpose of giving self-studying students and teaching organizations the means to easily get access to high-quality, generated math problems to suit their needs.
https://lukew3.github.io/mathgenerator
MIT License
690 stars 178 forks source link

Updated equation_of_line_from_two_points.py #369

Closed Sankari-K closed 3 years ago

Sankari-K commented 3 years ago

The generator got deleted in a previous commit. I added it back in and updated it for the following. Added cases to generate proper equations when: 1) The coefficient of x equals one. Will print "x" instead of "1x" 2) The coefficient of y equals one. Will print "y" instead of "1y" 3) The coefficient of y or x equals zero. Will print equation appropriately instead of "0y" or "0x" Please let me know if anything needs to be modified.