Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Simple Areas by UFO665
from math import pi, sqrt
def simple_areas(*args):
if len(args) == 1:
return pi * (args[0] / 2.0) ** 2
elif len(args) == 2:
return args[0] * args[1]
else:
p = sum(args) / 2.0
return sqrt(p * (p - args[0]) * (p - args[1]) * (p - args[2]))
Jan. 28, 2016