0
Hi. Does anyone know how to go from seconds to days, hours, minutes and seconds?
Pyton g
6 Answers
+ 2
Unclear
What purpose are you achieving?
What function are you using?
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app
In general, multiply by 60 for seconds to be minutes, multiple by 60 for minutes to be hours, etc.
+ 2
So what you're asking is:
Given a duration in
seconds
You want to convert it to
days hours minutes seconds?
0
a=int(raw_inpit(""))
print
dias= second / (24*60*60)
second= (second % (24*60*60))
hour= (second/(60*60))
hour= (second % (60*60))
minutes=(hour/60)
minutes=(second /60)
second =(minutes / 60)
print " % d seconds equals:% d days,% d hours,% d minutes,% d   seconds " % (second, day, minute, second
0
I did it like that
0
Prometheus
Yes, that exactly
0
here you go
sec = float(input())
mtn = sec/60
hr = mtn/60
day = hr/24