I am making a project and was wondering how I could use code to tell if the user has entered something other than "Male", "Female", "male", or "female".
I am using Python 3.0
This is my code:
import time
def w(t):
if t == t:
time.sleep(t)
print("In the following story, you are a mouse. Please fill out the following information (the story will use this name and gender).")
w(3)
print('\n')
name = input("Your Name:")
w(0.5)
print('\n')
gender = input("Your Gender (Male / Female):")
w(0.5)
print('\n')
input("Press Enter to Begin The Story")
w(1)
print('\n')
print("The Lion and The Mouse")
print("A Short Tale by Aesop")
w(1)
print('\n')
print("Once upon a time in a secluded jungle, there was a mouse.")
w(2)
print('\n')
if gender == ("male" or "Male"):
heorshe = "he"
hisher = "his"
himher = "him"
himselfherself = "himself"
HeShe = "He"
if gender == "female" or "Female":
heorshe = "she"
hisher = "her"
himher = "her"
himselfherself = "herself"
HeShe = "He"
I would also like to be able to tell if the user has entered in nothing into the input! Please help!