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

11 lines
266 B
Python

from .__init__ import *
def surfaceAreaSphere(maxSide=20, unit='m'):
r = random.randint(1, maxSide)
problem = f"Surface area of Sphere with radius = {r}{unit} is"
ans = 4 * math.pi * r * r
solution = f"{ans} {unit}^2"
return problem, solution