ahuacatlan
Programmer
Hi,
I would like to take a variable that is the current time and add times to it. I would like the script to print what 5:30 + 45 minutes is.
This is what I have so far:
from time import localtime, strftime
currenttime = strftime("%H:%M", localtime())
currentday = strftime("%a", localtime())
print "The current time is", currenttime, "and the today is", currentday
if currentday == "Mon":
print "lessons begin in", currenttime + 45 minutes
I need help with what to put in place of the 45 minutes
Thanks!
james
I would like to take a variable that is the current time and add times to it. I would like the script to print what 5:30 + 45 minutes is.
This is what I have so far:
from time import localtime, strftime
currenttime = strftime("%H:%M", localtime())
currentday = strftime("%a", localtime())
print "The current time is", currenttime, "and the today is", currentday
if currentday == "Mon":
print "lessons begin in", currenttime + 45 minutes
I need help with what to put in place of the 45 minutes
Thanks!
james