gingerlilmoore

Writing an equation in Python

Discussion created by gingerlilmoore on Jul 9, 2013
Latest reply on Jul 15, 2013 by rzufelt
Hi,
I am new to python, and need some help writing an equation into python.  The algorithm calculates the energetic costs of human movement over different terrains.  I would like to create a script with this where I can allow users to input different values for the various variables. 

M= 1.5W + 2.0(W+L)(L/W)^2+n(W+L)(1.5V^2+0.35VS)

where
M= metabolic rate in watts (kilojoules/minute)
W=the weight of the person in kilograms
L=the load carried by the person in kilograms
n=value reflecting the terrain
V=the speed of waling in m/s
S=percentage gradient

This is probably a lot easier than I am making it, but I am also in a time crunch (need it in a week), and as of yet have had no luck figuring it out.  I would greatly appreciate any help that I can get .

Thank you,
Ginger

Outcomes