Scientific Computing with Python Projects - Time Calculator

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

what’s the issues of the code

def add_time(start, duration,*args):
    star_index = start.find(':')
    dura_index = duration.find(':')
    hours_star = int(start[:star_index])
    minites_star = int(start[star_index+1:star_index+3])
    hours_dura = int(duration[:dura_index])
    minites_dura = int(durtion[dura_index+1:]) 
    newhour = hours_star + hours_dura
    newminites =minites_star + minites_dura
    L = ['Sunday','Monday','Thuesday','Wednesday','Thursday','Friday','Saturday']
    index1 = l.find(*args)
    if newminites > 60:
        newhour +=1
        newminites = newminites - 60
    start.replace(start[star_index+1:star_index+3],str(nweminites))
    if start.find('AM') is True:
        def hour_define1(newhour):
            if newhour > 12 and newhour < 24:
                n = newhour // 24
                newhour -= 12
                start.replace('AM','PM')
                
            elif newhour >= 24 and newhour < 36:
                n = newhour // 24
                newhour -= 24
            elif nehour >= 36 and newhour < 48:
                n = newhour // 24
                newhour -= 36
                start.replace('AM','PM')
            elif newhour >= 48:
                n = newhour // 24
                newhour %= 24
                hour_define1(newhour)
            return newhour,n   
        hour_define1(newhour)
        start.replace(start[:star_index],str(newhour)) 
    elif start.find('PM') is True:
        def hour_define2(newhour):
            if newhour > 12 and newhour < 24:
                n = newhour // 24
                newhour -= 12
                start.replace('PM','AM')
            elif newhour >= 24 and newhour < 36:
                n = newhour // 24
                newhour -= 24
            elif nehour >= 36 and newhour < 48:
                n = newhour // 24
                newhour -= 36
                start.replace('PM','AM')
            elif newhour >= 48:
                n = newhour // 24
                newhour %= 24
                hour_define1(newhour)
            return newhour,n     
        hour_define1(newhour)
        start.replace(start[:star_index],str(newhour)) 
    if n == 0:
        new_time = start + ' ' + *args  
    elif n == 1:
        index1 = (index1 + 1) % len(L)
        args = L[index1]
        new_time = f'{start} {args} (next day)'
    elif n >= 2:
        index1 = (index1 + n) % len(L)
        args = L[index1]
        new_time = f'{start} {args} ({n} days later)'
    return new_time 
print(add_time('3:30 PM', '2:12'))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge Information:

Scientific Computing with Python Projects - Time Calculator

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Are you getting an error or failing a test? Please share some more details.