mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Rounded to 2 decimal places
This commit is contained in:
@@ -390,7 +390,7 @@ def primeFactors(minVal=1, maxVal=200):
|
|||||||
def regularPolygonAngle(minVal = 3,maxVal = 20):
|
def regularPolygonAngle(minVal = 3,maxVal = 20):
|
||||||
sideNum = random.randint(minVal, maxVal)
|
sideNum = random.randint(minVal, maxVal)
|
||||||
problem = f"Find the angle of a regular polygon with {sideNum} sides"
|
problem = f"Find the angle of a regular polygon with {sideNum} sides"
|
||||||
exteriorAngle = (360/sideNum)
|
exteriorAngle = round((360/sideNum),2)
|
||||||
solution = 180 - exteriorAngle
|
solution = 180 - exteriorAngle
|
||||||
return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user