mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
15 lines
315 B
Python
15 lines
315 B
Python
from .__init__ import *
|
|
from ..__init__ import Generator
|
|
|
|
|
|
def squareRootFunc(minNo=1, maxNo=12):
|
|
b = random.randint(minNo, maxNo)
|
|
a = b * b
|
|
|
|
problem = "sqrt(" + str(a) + ")="
|
|
solution = str(b)
|
|
return problem, solution
|
|
|
|
|
|
squareRoot = Generator("Square Root", 6, "sqrt(a)=", "b", squareRootFunc)
|