# Scientific Computing with Python Projects (Issue with code)

Tell us what’s happening:
I can’t seem to figure out the error

``````       def add_time(start, duration, arg = "False"):
#split the time into hour and minutes
start_hrs = int(start.split(':'))
#convert into a 24hrs format for easier conversions
if 'PM' in start:
start_hrs += 12
start_min = start.split(':').split()
# Duration time splitted
duration_hrs = int(duration.split(':'))
duration_min = int(duration.split(':'))

#Amount of days passed Verbose
hrs = int(start_hrs + duration_hrs)
min = int(start_min) + int(duration_min)
total = hrs + min
days_passed = (total / 60) / 24

# Calculating hour (24 format)
future_hrs = (total / 60)  % 24
print(future_hrs) #PROBLEM HERE SOMEWHWERE
PM = False
if future_hrs >= 12:
future_hrs -= 12
if future_hrs == 0:
future_hrs = 12
PM = True
if future_hrs == 0:
future_hrs = 12
future_min = str((min % 60)).zfill(2)

if arg == "False":
if days_passed > 1:
if PM:
new_time = f"{future_hrs}:{future_min} PM ({days_passed} days later)"
else:
new_time = f"{future_hrs}:{future_min} AM ({days_passed} days later)"
elif days_passed == 1:
if PM:
new_time = f"{future_hrs}:{future_min} PM (next day)"
else:
new_time = f"{future_hrs}:{future_min} AM (next day)"
else:
if PM:
new_time = f"{future_hrs}:{future_min} PM"
else:
new_time = f"{future_hrs}:{future_min} AM"

else:
days = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
day = days[days.index(arg.capitilize()) + 1 + days_passed) % 7 - 1]
if days_passed > 1:
if PM:
new_time = f"{future_hrs}:{future_min}PM, {day} ({days_passed} days later)"
else:
new_time = f"{future_hrs}:{future_min}AM, {day} ({days_passed} days passed)"
elif days_passed == 1:
if PM:
new_time = f"{future_hrs}:{future_min} PM, {day} next day)"
else:
new_time = f"{future_hrs}:{future_min} AM, {day} next day)"
else:
if PM:
new_time = f"{future_hrs}:{future_min} PM, {day}"
else:
new_time = f"{future_hrs}:{future_min} AM, {day}"

return new_time
``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36`.
You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.