Converting cubic cm to litres in python -


i want write function when input dimensions of truncated cone (a cup) , amount of liquid in litres returns how many of these cups can filled amount of liquid.

def number_of_cups(bottom_radius, top_radius, height, litres_of_liquid):      volume = math.pi / 3 * height * (bottom_radius**2 + top_radius * bottom_radius +  top_radius**2)      return int(filled_cup) 

this far have got, don't understand how convert volume in cm^3 litres using python. how incorporate conversion of 1l = 1000 code

i running python 3 clear version confusion.

any obliged.

there 1000 cubic centimeters in liter, divide 1000.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -