This commit is contained in:
lukew3
2020-12-18 14:13:54 -05:00
parent 435fd98e48
commit 2064bf0d9b
2 changed files with 3 additions and 6 deletions

View File

@@ -1,12 +1,9 @@
from .__init__ import * from .__init__ import *
def multiplicationFunc(maxRes=99, maxMulti=99, style='raw'): def multiplicationFunc(maxMulti=12, style='raw'):
a = random.randint(0, maxMulti) a = random.randint(0, maxMulti)
if a == 0: b = random.randint(0, maxMulti)
b = random.randint(0, maxRes)
else:
b = random.randint(0, min(int(maxMulti / a), maxRes))
c = a * b c = a * b
if style == 'latex': if style == 'latex':

View File

@@ -1,4 +1,4 @@
from mathgenerator import mathgen from mathgenerator import mathgen
for _ in range(100): for _ in range(100):
print(mathgen.genById(71, style='latex')) print(mathgen.genById(2, maxMulti=100, style='latex'))