Files
mathgenerator/mathgenerator/funcs/basic_math/complex_division.py
2020-11-20 20:17:28 -05:00

16 lines
377 B
Python

from .__init__ import *
def complexDivisionFunc(maxRes=99, maxDivid=99):
a = random.randint(0, maxDivid)
b = random.randint(0, min(maxRes, maxDivid))
c = a / b
c = round(c, 2)
problem = str(a) + "/" + str(b) + "="
solution = str(c)
return problem, solution
complex_division = Generator("Complex Division", 13, "a/b=", "c", complexDivisionFunc)