This loop keeps looping even if I enter "no" and when I type "jdlfjap", for example, it continues to loop without a "?".
Does anyone know why this is?
def makeContact():
contactName = input("Name: ")
contactNumber = input("Number: ")
dictionaryForContacts[contactName] = contactNumber
def continueMaking():
while True:
continueMaking = input("\nWould you like to continue making contacts? ")
if continueMaking == "Yes" or "yes" or "YES":
makeContact()
continue
elif continueMaking == "No" or "no" or "NO":
break
else:
print ("?")
continue
continueMaking == "No" or "no" or "NO"doesn't do what you think it does. It doesn't comparecontinueMakingto each of those 3 words.lower()or checkoutinif continueMaking in ("Yes", "yes", "YES")orif continueMaking.strip().lower() == "yes">>> "no" == "Yes" or "yes" or "YES"gives'yes'