Tell us what’s happening:
I am having problems figuring out what to do with start and how to make this work: Any hint or tips are appreciated thnx
This is the logic I have so far
A start time in the 12-hour clock format (ending in AM or PM)
a day has a total of 24 hours
12:00 AM
12:00 PM
each of those 12 hours exsist of 1 hour
each 1 hour is 60 min which exist out of 60 X 60 min
duration time = the time something last example a movie can last 1 hour
duration time + start time #add duration time to the start time
#return result new_time
if the result is more then 24 hours then add new_time +(next day)
elif more then 1 day new_time +(n days later)
return new_time
Your code so far
sec = 60
min = sec * 60
hour = min * 60
AM = 12 * hour
PM = 12 * hour
if AM > 12
return(PM)
day = AM + PM
start = day
def add_time(start, duration):
duration + start
return new_time
if new_time < 24:00:
print(new_time)
elif new_time > 24:00:
print (new_time + (next day))
elif new_time > 48:00:
print(new_time+ (n days later))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
.
Challenge: Time Calculator
https://repl.it/talk/share/my-share/48148
Link to the challenge: