On Saturday, February 8, 2014 7:05:49 AM UTC+2, Rustom Mody wrote: > On Saturday, February 8, 2014 10:14:10 AM UTC+5:30, Scott W Dunning wrote: > > > I have a question that was a part of my homework > > and I got it correct but the teacher urged me to do it using the > > % sign rather than subtracting everything, for some reason I'm > > having issues getting it to calculate correctly. I'll put the > > question below, and what I originally had and below that what > > I've been working on with the %. > >
just 2 lines, they are self explanatory days = int((seconds % (60 * 60 * 24 * 7))/(60 * 60 * 24)) hours = int((seconds % (60 * 60 * 24))/(60 * 60)) feel free to ask /Asaf -- https://mail.python.org/mailman/listinfo/python-list