Created
April 19, 2012 00:55
-
-
Save eloyesp/2417633 to your computer and use it in GitHub Desktop.
ejercicio 5
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
# Este programa cambia el formato del tiempo | |
print "Inicio del tiempo: 00:00:00 del 01/01/2012" | |
segundos_trans = int(raw_input("Segundos transcurridos: ")) | |
minutos_trans = segundos_trans / 60 | |
segs = segundos_trans % 60 | |
horas_trans = minutos_trans / 60 | |
mins = minutos_trans % 60 | |
dias_trans = horas_trans / 24 | |
hors = horas_trans % 24 | |
mes_trans = dias_trans / 30 | |
dia = dias_trans % 30 + 1 | |
mes = mes_trans % 12 + 1 | |
horario = str(hors) + ' h. ' + str(mins) + ' min. ' + str(segs) + ' seg.' | |
fecha = str(dia) + ' del ' + str(mes) + ' de 2012' | |
print 'Ese tiempo corresponde a las', horario, 'del dia', fecha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment