Python Forum
How do you do this equation? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: How do you do this equation? (/thread-8980.html)



How do you do this equation? - MEH012 - Mar-16-2018

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))



RE: How do you do this equation? - buran - Mar-16-2018

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