i'm very new to programming so please excuse the silly question. How do I make this loop so that if the person inputs a random string (which isn't yes or no) it will return "Invalid response"?
name = input("What's your name? ")
understanding = input("{}, do you understand while loops in python\n(Yes or No)? ".format(name))
while understanding.lower() != 'yes':
print("Ok, {}, while loops in Python repeat as long as a certain Boolean condition is met.".format(name))
understanding = input("{}, now do you understand Python while loops?\n(Yes or No)? ".format(name))
print("Great news {}! It's good to hear that you understand these loops now! Let's move on!".format(name))