I don't understand why the following does not operate correctly and raises errors when radius or height are float numbers.
def cone(radius, height):
if isinstance(radius, int) or isinstance(radius,float) == False:
raise TypeError("Error: parameters radius and height must be numeric.")
if isinstance(height, int) or isinstance (height,float)== False:
raise TypeError("Error: parameters radius and height must be numeric.")
if radius > 0 and height > 0:
return ((radius*radius)*(3.1415)*(height/3))
if radius<=0:
raise ValueError("Error: radius must be positive.")
if height <=0:
raise ValueError("Error: height must be positive.")