Files
mathgenerator/mathgenerator/funcs/exponentiationFunc.py
2020-10-19 14:08:13 -04:00

11 lines
244 B
Python

from .__init__ import *
def exponentiationFunc(maxBase=20, maxExpo=10):
base = random.randint(1, maxBase)
expo = random.randint(1, maxExpo)
problem = f"{base}^{expo} ="
solution = str(base**expo)
return problem, solution