mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
mostly linter fixes
This commit is contained in:
@@ -110,4 +110,4 @@ from .minutes_to_hours import *
|
||||
from .decimal_to_bcd import *
|
||||
from .circumference import *
|
||||
from .combine_like_terms import *
|
||||
from .conditional_probability import *
|
||||
from .conditional_probability import *
|
||||
|
||||
@@ -5,12 +5,12 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100):
|
||||
d = random.randint(-1 * maxd, maxd)
|
||||
a1 = random.randint(-1 * maxa, maxa)
|
||||
a2 = a1 + d
|
||||
a3 = a1 + 2*d
|
||||
a3 = a1 + 2 * d
|
||||
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
|
||||
an = a1+(n-1)*d
|
||||
solution = n * (a1+an) / 2
|
||||
an = a1 + (n - 1) * d
|
||||
solution = n * (a1 + an) / 2
|
||||
return problem, solution
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from .__init__ import *
|
||||
import math
|
||||
|
||||
|
||||
def circumferenceCircle(maxRadius=100):
|
||||
r = random.randint(0, maxRadius)
|
||||
pi = 22/7
|
||||
circumference = 2*pi*r
|
||||
circumference = 2 * math.pi * r
|
||||
problem = f"Circumference of circle with radius {r}"
|
||||
solution = circumference
|
||||
return problem, solution
|
||||
|
||||
Reference in New Issue
Block a user