Created
November 28, 2016 21:13
-
-
Save rodrigoSyscop/4146ec67be7327644a0423a9014b8026 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
#!/usr/bin/env python3 | |
seconds = input("Por favor, entre com o número de segundos que deseja converter: ") | |
seconds = int(seconds) | |
day = 86400 | |
hour = 3600 | |
minute = 60 | |
days = seconds // day | |
seconds = seconds % day | |
hours = seconds // hour | |
seconds = seconds % hour | |
minutes = seconds // minute | |
seconds = seconds % minute | |
print("{} dias, {} horas, {} minutos e {} segundos.".format( | |
days, hours, minutes, seconds | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment