From d95dd5e29c76561b35d5d18ab249d237d7a927e2 Mon Sep 17 00:00:00 2001 From: Anshita Date: Tue, 20 Oct 2020 00:55:15 +0530 Subject: [PATCH] linting improved v2 --- mathgenerator/funcs/arithmeticProgressionSumFunc.py | 3 +-- mathgenerator/funcs/arithmeticProgressionTermFunc.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mathgenerator/funcs/arithmeticProgressionSumFunc.py b/mathgenerator/funcs/arithmeticProgressionSumFunc.py index 950f7c1..517d713 100644 --- a/mathgenerator/funcs/arithmeticProgressionSumFunc.py +++ b/mathgenerator/funcs/arithmeticProgressionSumFunc.py @@ -9,6 +9,5 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100): n = random.randint(4, maxn) apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... ' problem = 'Find the sum of first ' + str(n) + ' terms of the AP series: ' + apString - solution = n * ((2 * a1) + ((n-1) * d)) / 2 + solution = n * ((2 * a1) + ((n - 1) * d)) / 2 return problem, solution - \ No newline at end of file diff --git a/mathgenerator/funcs/arithmeticProgressionTermFunc.py b/mathgenerator/funcs/arithmeticProgressionTermFunc.py index cba850d..63cca09 100644 --- a/mathgenerator/funcs/arithmeticProgressionTermFunc.py +++ b/mathgenerator/funcs/arithmeticProgressionTermFunc.py @@ -9,5 +9,5 @@ def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100): n = random.randint(4, maxn) apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... ' problem = 'Find the term number ' + str(n) + ' of the AP series: ' + apString - solution = a1 + ((n-1) * d) + solution = a1 + ((n - 1) * d) return problem, solution