Skip to content

Instantly share code, notes, and snippets.

@julienfastre
Last active August 29, 2015 13:57
Show Gist options
  • Save julienfastre/9909449 to your computer and use it in GitHub Desktop.
Save julienfastre/9909449 to your computer and use it in GitHub Desktop.
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