Created
January 11, 2017 00:29
-
-
Save samverneck/b244464881e9e91cb08ee49431911b9b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
totalSegundos = int(input("Por favor, entre com o número de segundos que deseja converter: ")) | |
segundosRestantes = totalSegundos % 3600 | |
segundos = segundosRestantes % 60 | |
minutos = segundosRestantes // 60 | |
horas = (totalSegundos // 3600) % 24 | |
dias = (totalSegundos // 3600) // 24 | |
print(dias, "dias,", horas, "horas,", minutos, "minutos e", segundos, "segundos.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment