linting improved v2

This commit is contained in:
Anshita
2020-10-20 00:55:15 +05:30
parent da48b28397
commit d95dd5e29c
2 changed files with 2 additions and 3 deletions

View File

@@ -9,6 +9,5 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100):
n = random.randint(4, maxn) n = random.randint(4, maxn)
apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... ' apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... '
problem = 'Find the sum of first ' + str(n) + ' terms of the AP series: ' + apString 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 return problem, solution

View File

@@ -9,5 +9,5 @@ def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100):
n = random.randint(4, maxn) n = random.randint(4, maxn)
apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... ' apString = str(a1) + ', ' + str(a2) + ', ' + str(a3) + ' ... '
problem = 'Find the term number ' + str(n) + ' of the AP series: ' + apString 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 return problem, solution