mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
renamed modules and generators to fit pep8
This commit is contained in:
14
mathgenerator/funcs/cube_root.py
Normal file
14
mathgenerator/funcs/cube_root.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from .__init__ import *
|
||||
|
||||
|
||||
def cubeRootFunc(minNo=1, maxNo=1000):
|
||||
b = random.randint(minNo, maxNo)
|
||||
a = b**(1 / 3)
|
||||
|
||||
problem = "cuberoot of " + str(b) + " upto 2 decimal places is:"
|
||||
solution = str(round(a, 2))
|
||||
return problem, solution
|
||||
|
||||
|
||||
cube_root = Generator("Cube Root", 47, "Cuberoot of a upto 2 decimal places is",
|
||||
"b", cubeRootFunc)
|
||||
Reference in New Issue
Block a user