-
-
Save parzibyte/4b957a79631317eb18a87ff5cfe23ffd 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 obtener_tiempo_transcurrido(segundos): | |
dias = int(segundos / 60 / 60 / 24) | |
segundos -= dias * 60 * 60 * 24 | |
horas = int(segundos / 60 / 60) | |
segundos -= horas*60*60 | |
minutos = int(segundos/60) | |
segundos -= minutos*60 | |
return f"{dias} días, {horas} horas, {minutos} minutos y {segundos} segundos" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment