diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 83702eb..bf9803e 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -84,3 +84,5 @@ from .compoundInterestFunc import * from .deciToHexaFunc import * from .percentageFunc import * from .celsiustofahrenheit import * +from .arithmeticProgressionSumFunc import * +from .arithmeticProgressionTermFunc import * diff --git a/mathgenerator/funcs/arithmeticProgressionSumFunc.py b/mathgenerator/funcs/arithmeticProgressionSumFunc.py index ca2ada3..d7e5589 100644 --- a/mathgenerator/funcs/arithmeticProgressionSumFunc.py +++ b/mathgenerator/funcs/arithmeticProgressionSumFunc.py @@ -1,5 +1,6 @@ from .__init__ import * + def arithmeticProgressionSumFunc (maxd = 100, maxa = 100, maxn = 100): d = random.randint (-1 * maxd, maxd) a1 = random.randint (-1 * maxa, maxa) diff --git a/mathgenerator/funcs/arithmeticProgressionTermFunc.py b/mathgenerator/funcs/arithmeticProgressionTermFunc.py index f6662d5..9905b2b 100644 --- a/mathgenerator/funcs/arithmeticProgressionTermFunc.py +++ b/mathgenerator/funcs/arithmeticProgressionTermFunc.py @@ -1,5 +1,6 @@ from .__init__ import * + def arithmeticProgressionTermFunc (maxd = 100, maxa = 100, maxn = 100): d = random.randint (-1 * maxd, maxd) a1 = random.randint (-1 * maxa, maxa) @@ -9,4 +10,4 @@ def arithmeticProgressionTermFunc (maxd = 100, maxa = 100, maxn = 100): apString = str(a1) +', ' + str(a2) +', ' + str(a3) + ' ... ' problem = 'Find the term number ' + str(n) + ' of the AP series: ' + apString solution = a1 + ((n-1)*d) - return problen, solution + return problem, solution diff --git a/mathgenerator/mathgen.py b/mathgenerator/mathgen.py index f9ef504..1e9b4d7 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -275,4 +275,4 @@ arithmeticProgressionTerm = Generator ("AP Term Calculation", 82, arithmeticProgressionSum = Generator ("AP Sum Calculation", 83, "Find the sum of first n terms of the AP series: a1, a2, a3 ...", - "Sum", arithmeticProgressionSumFunc) \ No newline at end of file + "Sum", arithmeticProgressionSumFunc)