Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Humpty Dumpty Form by Chramar
import math
def checkio(height, width):
if width>height:
b = height/2
a = width/2
e2 = 1 - b**2 / a**2
e = (e2**(1/2))
p = 2 * math.pi * a**2 * (1 + (1 - e2) / e * math.atanh(e))
v = 4*math.pi/3*a*a*b
return [round(v, 2), round(p, 2)]
elif width==height:
r = height/2
v = (4/3)*math.pi*r*r*r
p = 4*math.pi*r*r
return [round(v, 2), round(p, 2)]
elif width
Oct. 31, 2016