mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
19 lines
465 B
Python
19 lines
465 B
Python
from .__init__ import *
|
|
|
|
|
|
def volumeCube(maxSide=20, unit='m', format='string'):
|
|
a = random.randint(1, maxSide)
|
|
ans = a ** 3
|
|
|
|
if format == 'string':
|
|
problem = f"Volume of cube with side = {a}{unit} is"
|
|
solution = f"{ans} {unit}^3"
|
|
return problem, solution
|
|
else:
|
|
return a, ans, unit
|
|
|
|
|
|
volume_cube = Generator("Volum of Cube", 35,
|
|
volumeCube,
|
|
["maxSide=20", "unit='m'"])
|