Rounded to 2 decimal places

This commit is contained in:
Yash
2020-10-16 21:28:54 +05:30
parent 8a9912e40a
commit 4b3874cc74

View File

@@ -390,7 +390,7 @@ def primeFactors(minVal=1, maxVal=200):
def regularPolygonAngle(minVal = 3,maxVal = 20):
sideNum = random.randint(minVal, maxVal)
problem = f"Find the angle of a regular polygon with {sideNum} sides"
exteriorAngle = (360/sideNum)
exteriorAngle = round((360/sideNum),2)
solution = 180 - exteriorAngle
return problem, solution