Skip to content

Instantly share code, notes, and snippets.

@Linnk
Created March 13, 2014 22:17
Show Gist options
  • Save Linnk/9538237 to your computer and use it in GitHub Desktop.
Save Linnk/9538237 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
#
# DATOS INICIALES
#
import locale
distancia = 6430 # metros
altitud = 61 # metros
peso = 70 # kilogramos
minutos_kilometro = 6.75 # Trotar a 6:40 minutos por/ kilometro
#
# Aqui empiezan los calculos
#
metros_minuto = 60.0 / ((minutos_kilometro) * (60.0 / 1000.0)) # segundos por metro
pendiente = (altitud / distancia) # %
vo2 = 3.5 + metros_minuto*0.2 + metros_minuto*pendiente*0.9
met = vo2 / 3.5
calorias_hora = met * peso
#
# Imprimir resultado
#
print locale.format("%.*f", (2, calorias_hora), True) + ' calorias / hora'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment