diff --git a/mathgenerator/mathgen.py b/mathgenerator/mathgen.py index ed5a3ab..ca62058 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -37,7 +37,7 @@ def subtractionFunc(maxMinuend = 99, maxDiff = 99): def multiplicationFunc(maxRes = 99, maxMulti = 99): a = random.randint(0, maxMulti) - b = random.randint(0, min(maxRes, maxMulti)) + b = random.randint(0, min(int(maxMulti/a), maxRes)) c = a*b problem = str(a) + "*" + str(b) + "=" solution = str(c)