mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
11 lines
436 B
Python
11 lines
436 B
Python
from .__init__ import *
|
|
|
|
def sectorAreaFunc(maxRadius = 49,maxAngle = 359):
|
|
Radius = random.randint(1, maxRadius)
|
|
Angle = random.randint(1, maxAngle)
|
|
problem = f"Given radius, {Radius} and angle, {Angle}. Find the area of the sector."
|
|
secArea = float((Angle / 360) * math.pi*Radius*Radius)
|
|
formatted_float = "{:.5f}".format(secArea)
|
|
solution = f"Area of sector = {formatted_float}"
|
|
return problem, solution
|