Last active
August 29, 2015 13:57
-
-
Save julienfastre/9909449 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc(length, use): | |
if use == 10: | |
speed = 120 | |
elif use == 11: | |
speed = 80 | |
elif use == 20 or use == 21: | |
speed = 90 | |
elif use == 22 or use == 30 or use == 31 or use == 32: | |
speed = 50 | |
elif use == 40 or use == 50: | |
speed = 30 | |
else: | |
speed = 30 | |
#go back to meters | |
speed = speed * 1000 | |
time = length /speed | |
#transform into minutes | |
time = time * 60 | |
return time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment