mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
14 lines
257 B
Python
14 lines
257 B
Python
from .__init__ import *
|
|
|
|
|
|
def squareFunc(maxSquareNum=20):
|
|
a = random.randint(1, maxSquareNum)
|
|
b = a * a
|
|
|
|
problem = str(a) + "^2" + "="
|
|
solution = str(b)
|
|
return problem, solution
|
|
|
|
|
|
square = Generator("Square", 8, "a^2", "b", squareFunc)
|