diff --git a/mathgenerator/funcs/compoundInterestFunc.py b/mathgenerator/funcs/compoundInterestFunc.py index 6f4fba3..bd3664e 100644 --- a/mathgenerator/funcs/compoundInterestFunc.py +++ b/mathgenerator/funcs/compoundInterestFunc.py @@ -1,5 +1,6 @@ from .__init__ import * + def compoundInterestFunc(maxPrinciple = 10000, maxRate = 10, maxTime = 10, maxPeriod = 10): p = random.randint(100, maxPrinciple) r = random.randint(1, maxRate) diff --git a/mathgenerator/funcs/set_operation.py b/mathgenerator/funcs/set_operation.py index 370c827..4f0a27a 100644 --- a/mathgenerator/funcs/set_operation.py +++ b/mathgenerator/funcs/set_operation.py @@ -1,6 +1,7 @@ from .__init__ import * -def set_operation(minval = 3, maxval = 7, n_a = 4, n_b = 5): + +def set_operation(minval=3, maxval=7, n_a=4, n_b=5): number_variables_a = random.randint(minval, maxval) number_variables_b = random.randint(minval, maxval) a = [] @@ -12,5 +13,5 @@ def set_operation(minval = 3, maxval = 7, n_a = 4, n_b = 5): a=set(a) b=set(b) problem = "Given the two sets a=" + str(a) + " ,b=" + str(b) + ".Find the Union,intersection,a-b,b-a and symmetric difference" - solution ="Union is " + str(a.union(b)) + ",Intersection is " + str(a.intersection(b)) + ", a-b is " + str(a.difference(b)) + ",b-a is " + str(b.difference(a)) + ", Symmetric difference is " + str(a.symmetric_difference(b)) + solution = "Union is " + str(a.union(b)) + ",Intersection is " + str(a.intersection(b)) + ", a-b is " + str(a.difference(b)) + ",b-a is " + str(b.difference(a)) + ", Symmetric difference is " + str(a.symmetric_difference(b)) return problem, solution