Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Using math library solution in Clear category for Humpty Dumpty Form by Sebastian.M
import math
def checkio(height,width):
c = height/2
a = width/2
if ca:
e = (1-(a**2/c**2))**0.5
area = 2*math.pi*(a**2)*(1+(c/(a*e))*math.asin(e))
else:
area = 4*math.pi*(c**2)
volume = (4*math.pi/3)*(a**2)*c
return [round(volume,2),round(area,2)]
Nov. 5, 2016