mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Fixed accidentally removed + sign
This commit is contained in:
@@ -222,7 +222,7 @@ def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20):
|
|||||||
c = random.randint(1, maxC)
|
c = random.randint(1, maxC)
|
||||||
s = (a+b+c)/2
|
s = (a+b+c)/2
|
||||||
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
|
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
|
||||||
problem = "Area of triangle with side lengths: "+ str(a) +" "+ str(b) +" "+ str(c) " = "
|
problem = "Area of triangle with side lengths: "+ str(a) +" "+ str(b) +" "+ str(c) + " = "
|
||||||
solution = area
|
solution = area
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
@@ -272,4 +272,4 @@ fractionDivision = Generator("Fraction Division", 16, "(a/b)/(c/d)=", "x/y", div
|
|||||||
intMatrix22Multiplication = Generator("Integer Multiplication with 2x2 Matrix", 17, "k * [[a,b],[c,d]]=", "[[k*a,k*b],[k*c,k*d]]", multiplyIntToMatrix22)
|
intMatrix22Multiplication = Generator("Integer Multiplication with 2x2 Matrix", 17, "k * [[a,b],[c,d]]=", "[[k*a,k*b],[k*c,k*d]]", multiplyIntToMatrix22)
|
||||||
areaOfTriangle = Generator("Area of Triangle", 18, "Area of Triangle with side lengths a, b, c = ", "area", areaOfTriangleFunc)
|
areaOfTriangle = Generator("Area of Triangle", 18, "Area of Triangle with side lengths a, b, c = ", "area", areaOfTriangleFunc)
|
||||||
doesTriangleExist = Generator("Triangle exists check", 19, "Does triangle with sides a, b and c exist?","Yes/No", isTriangleValidFunc)
|
doesTriangleExist = Generator("Triangle exists check", 19, "Does triangle with sides a, b and c exist?","Yes/No", isTriangleValidFunc)
|
||||||
midPointOfTwoPoint=Generator("Midpoint of the two point", 20,"((X1,Y1),(X2,Y2))=","((X1+X2)/2,(Y1+Y2)/2)",MidPointOfTwoPointFunc)
|
midPointOfTwoPoint=Generator("Midpoint of the two point", 20,"((X1,Y1),(X2,Y2))=","((X1+X2)/2,(Y1+Y2)/2)",MidPointOfTwoPointFunc)
|
||||||
|
|||||||
Reference in New Issue
Block a user