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
681 stars 176 forks source link

Update expanding() function in algebra.py #435

Open ialoko opened 10 months ago

ialoko commented 10 months ago

Updated algebra/expanding string integer out of range error

Fixes #403 I fixed the bug causing the string out of range error .

I also fixed some other issues where the function was allowing invalid algebraic expressions.

I also fixed the output so that it takes into account situations where a number is zero for either or all terms.

Fixed some other minor formatting issues. Tested my function and works correctly.