Skip to content

Instantly share code, notes, and snippets.

@samverneck
Created January 11, 2017 00:29
Show Gist options
  • Save samverneck/b244464881e9e91cb08ee49431911b9b to your computer and use it in GitHub Desktop.
Save samverneck/b244464881e9e91cb08ee49431911b9b to your computer and use it in GitHub Desktop.
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