[Tutor] How to convert seconds to hh:mm:ss format

Asokan Pichai pasokan at talentsprint.com
Fri Feb 17 09:04:17 CET 2012


On Fri, Feb 17, 2012 at 3:16 AM, alain Delon <racgomi at yahoo.com> wrote:
> userName = raw_input("Enter your name ")
>      print "hi " + userName + ". \n "
>      seconds = input("Enter the number of seconds since midnight:")
>      hours = seconds/3600
********************************
>      hoursRemain = hours%60
********************************
Here is your error

>      minutes = hoursReamain/60
>      secondsRemain = minutes%60
>      print "hours: " + "minutes: " + "seconds"
>
>
> I'm going to be crazy. Please give me a hand. Thank you very much.
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list