mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Sum of Angles of Polygon function added
This commit is contained in:
@@ -81,3 +81,4 @@ problem, solution = mathgen.genById(0)
|
|||||||
| 47 | Cube Root | cuberoot of 711 upto 2 decimal places is: | 8.93 | CubeRoot |
|
| 47 | Cube Root | cuberoot of 711 upto 2 decimal places is: | 8.93 | CubeRoot |
|
||||||
| 48 | Power Rule Integration | 3x^1 | (3/1)x^2 + c | powerRuleIntegration |
|
| 48 | Power Rule Integration | 3x^1 | (3/1)x^2 + c | powerRuleIntegration |
|
||||||
| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 94 , 101, 102 = | 63 | fourthAngleOfQuadrilateral |
|
| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 94 , 101, 102 = | 63 | fourthAngleOfQuadrilateral |
|
||||||
|
| 50 | Sum of Angles of Polygon | Sum of angles of polygon with 4 sides = | 360 | sumOfAnglesOfPolygon |
|
||||||
@@ -714,6 +714,13 @@ def fourthAngleOfQuadriFunc(maxAngle = 180):
|
|||||||
solution = angle4
|
solution = angle4
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
|
def sumOfAnglesOfPolygonFunc(maxSides = 12):
|
||||||
|
side = random.randint(3, maxSides)
|
||||||
|
sum = (side - 2) * 180
|
||||||
|
problem = f"Sum of angles of polygon with {side} sides = "
|
||||||
|
solution = sum
|
||||||
|
return problem, solution
|
||||||
|
|
||||||
# || Class Instances
|
# || Class Instances
|
||||||
|
|
||||||
#Format is:
|
#Format is:
|
||||||
@@ -769,3 +776,4 @@ matrixMultiplication = Generator("Multiplication of two matrices", 46, "Multipl
|
|||||||
CubeRoot = Generator("Cube Root",47,"Cuberoot of a upto 2 decimal places is","b",cubeRootFunc)
|
CubeRoot = Generator("Cube Root",47,"Cuberoot of a upto 2 decimal places is","b",cubeRootFunc)
|
||||||
powerRuleIntegration = Generator("Power Rule Integration", 48, "nx^m=", "(n/m)x^(m+1)", powerRuleIntegrationFunc)
|
powerRuleIntegration = Generator("Power Rule Integration", 48, "nx^m=", "(n/m)x^(m+1)", powerRuleIntegrationFunc)
|
||||||
fourthAngleOfQuadrilateral = Generator("Fourth Angle of Quadrilateral",49,"Fourth angle of Quadrilateral with angles a,b,c =","angle4",fourthAngleOfQuadriFunc)
|
fourthAngleOfQuadrilateral = Generator("Fourth Angle of Quadrilateral",49,"Fourth angle of Quadrilateral with angles a,b,c =","angle4",fourthAngleOfQuadriFunc)
|
||||||
|
sumOfAnglesOfPolygon = Generator("Sum of Angles of Polygon", 50, "Sum of angles of polygon with n sides = ", "sum", sumOfAnglesOfPolygonFunc)
|
||||||
|
|||||||
Reference in New Issue
Block a user