Hello everyone checking this out. I'm very new to the world of Python3 language. I'm currently on the 3rd version of building up a simple program to make it more interactive. I'm looking to create a prompt if a user inputs anything besides yes or no into the given field. I have done searches and tried many examples. I'm sure it's something simple I am missing but I'm at a standstill.
print("What's up! My name is Kan Jones. What is your name?") # customize
introduction sentence.
myName = input().title() # Added .title() to capitalize 1st letter of user
name.
print("Would you like to play a guessing game with me " + myName + "?" + "
Yes or No?")
userAnswer = input("").title()
if userAnswer == "Yes":
print('Alrighty ' + myName + ', I am thinking of a number between 1 and
20.')
if userAnswer == "No":
print("Ahwww,well maybe next time. See you later")
exit() # if user doesn't inputs "no" program exits.
If anyone has input it is greatly appreciated!