Merge pull request #40 from mushahidq/master

Fix for multiplication parameters
This commit is contained in:
Luke Weiler
2020-10-15 09:33:33 -04:00
committed by GitHub

View File

@@ -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)