Using multiple functions to mimic a formula? : <p>I am attempting to write a filenamed bmr.py with a function named st_jeor which, if given (mass, height, age, sex), returns Mifflin St Jeor estimate of the basal metabolic rate, an estimate of the Calories consumed to keep the body alive. Assume mass is given in kilograms, height in centimeters, age in years, and sex is either "male" or "female".</p>

<p>S is +5 if sex is "male" and −161 if it is "female"; m, h, and a represent mass, height, and age respectively.<a href="https://i.stack.imgur.com/gTAGC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gTAGC.png" alt="enter image description here"></a></p>

<p>Here is what I started with:</p>

<pre><code>def st_jeor(mass, height, age, sex):
    global mass
    global height
    global age
    mass = (10.00*mass/1
    height =
    age =

    def sex(s):
        if sex == 'male':
            return 5
        else:
            return -161
</code></pre>

<p>Anyone have suggestions on what route I should be taking? Think I am confusing myself.</p>
