This is a piece of code I was trying to make one day:
proceed = 0
print """Welcome to Magyck and Monsters
A text-based RPG"""
charactor_name = raw_input("What is your name? ")
print "Welcome ", charactor_name
while proceed == 0:
gender_answer = raw_input("Are you male or female? ")
if gender_answer == "male" or "MALE" or "mALE" or "Male":
charactor_gender = "male"
proceed = 1
elif gender_answer == "Female" or "FEMALE" or "female" or "fEMALE":
charactor_gender = "female"
proceed = 1
else:
print "Sorry, I could not understand you."
proceed = 0
if proceed == 1:
print "You are a ", + charactor_gender
It was supposed to be a text-based RPG game, the problem is, when i run it, no matter what I enter for the gender, I get get the printed message "You are a male" as if it overrided the first if statement and somehow made it true. The way it is supposed to work is that during a loop you would be asked a question, then check if the answer really made any sense and assign it a specific value that would not change. if the answer did not make any sense, it was supposed to say "Sorry, I could not understand you." and loop back to the question. I am fairly new to coding and would appreciate any input.