Python Forum
How do you do this equation?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you do this equation?
#1
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))
Reply
#2
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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020