Files
mathgenerator/mathgenerator/funcs/logFunc.py
2020-10-19 13:54:31 -04:00

13 lines
250 B
Python

from .__init__ import *
def logFunc(maxBase=3, maxVal=8):
a = random.randint(1, maxVal)
b = random.randint(2, maxBase)
c = pow(b, a)
problem = "log" + str(b) + "(" + str(c) + ")"
solution = str(a)
return problem, solution