Files
mathgenerator/mathgenerator/funcs/regularPolygonAngleFunc.py
2020-10-19 13:54:31 -04:00

11 lines
306 B
Python

from .__init__ import *
def regularPolygonAngleFunc(minVal=3, maxVal=20):
sideNum = random.randint(minVal, maxVal)
problem = f"Find the angle of a regular polygon with {sideNum} sides"
exteriorAngle = round((360 / sideNum), 2)
solution = 180 - exteriorAngle
return problem, solution