```
import platform
import subprocess
import webbrowser

ipAddress = []

def show_ip():
    i = -1
    if(len(ipAddress) ==0):
        print('There are no IPs assigned')
        print ("")
    else:
        print("----List of IP Addresses----")
        for z in ipAddress:
            i = i + 1
            print("IP (", i, "):" , z)
        print("")

def add_ip():
    addIP = input('Enter IP: ')
    ipAddress.append(addIP)
    print('IP Added')
    print('')

def update_ip():
    updateIP = int(input('Enter IP [index] to update: '))
    newIP = input('Enter new IP: ')
    ipAddress[updateIP] = newIP
    print('Ip Updated')
    print('')

def delete_ip():
    delIP = input('Enter IP Address to Delete: ')
    ipAddress.remove(delIP)
    print ('IP', delIP, 'Deleted')
    print('')

def ping_ip():
    pingAddress = ""
    for b in ipAddress:
        if(platform.system() == 'Windows'):
            pingAddress = '-n'
        else:
            pingAddress = '-c'

        status = subprocess.call(['ping', pingAddress, '1', '127.0.0.1'])
        if status == 0:
            print (b, "Ping Successful")
        elif status == 2:
            print(b, 'Ping No respnse')
        else:
            print (b, 'Ping Failed')
    print('')

while(True):

        print ('------MENU------')
        print('[1] - Show Stored IPs')
        print('[2] - Add IP Address')
        print('[3] - Update IP Address')
        print('[4] - Delete IP Address')
        print('[5] - Ping IP Address')
        print('[6] - Help') 
        print('[7] - Exit ')

        choice = input('Please enter your choice: ')
        print('')

        if (choice =='1'):
            show_ip()
        elif (choice =='2'):
            add_ip()
        elif (choice =='3'):
            update_ip()
        elif (choice =='4'):
            delete_ip
        elif (choice =='5'):
            ping_ip
        elif (choice =='6') :
            webbrowser.open('help.html')    
        elif (choice =='7'):
            exit()
        else:
            print('Invalid input')

```

I dont know why option 4 and 5 wont work. It just loops again and again in the same menu that I did. Can someone help me with it because im going nuts figuring out why it doesn't work. I would be so thankful if someone figures it out because I tried for over 4 hours re arranging the code to get it to work