This Is Quite Simple but I cant get the hang of it. I'm writing a short program where you enter the name, it will compare to each item in the array, then if it is found print what number it is in the array. if it isnt found, then enter a new name
Names = ['alice', 'bob', 'carol', 'david']
name = input("Enter Name ").lower()
c = 0
while name != Names[c]:
c = c + 1
if c == (len(Names)):
name = input("Name Not Found \n \nEnter Name ").lower()
c = 0
if name == Names[c]:
print ("name found, in position ", c)
It Always Comes Up With Name Not Found