Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Simple Areas by OrginalS
from math import pi
def simple_areas(*a):
l = len(a)
if l == 1:
return round((a[0]/2)**2*pi, 2)
if l == 2:
return round(a[0]*a[1], 2)
p = sum(a)/2
return round((p*(p-a[0])*(p-a[1])*(p-a[2]))**0.5,2)
Jan. 2, 2020
Comments: