Python Forum

Full Version: How do you do this equation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone, I am extremely new to python, and pls tell me how do you write this equation in Python

how do you define equation calories/Minute = 0.0175 X MET X Weight in program

I am wondering about this thing below:
def poundsToMetric(pounds):
    kilograms = pounds / 2.2
    return int(kilograms)

kg = poundsToMetric(pounds)
print('The amount of pounds you entered is {}. '\
      'This is {} kilograms'.format(pounds, kg))
get input for variables used in the calculation (met, weight)
calculate and assign the result to a variable (calories_per_minute)
you can define a separate function for the calculation like in the example you provide