I'm starting out at python. I keep getting an error when I put a new raw_input inside an if statement. If the input they answered is incorrect I want to give them another chance to enter more input, is there another way to do this?
Heres the Code
attraction = {
'approach' : "words",
'introduction' : "words",
'qualification' : "words",
'rapport' : "words"
}
answer = raw_input("Pick from these approaches: introduction, qualification, or rapport:")
if answer != "approach" and answer != "introduction" and answer != "qualification" and answer != "rapport":
new_answer = raw_input("You didn't choose one of the choices, type in the choice you want again:")
if new_answer != "approach" and answer != "introduction" and answer != "qualification" and answer != "rapport":
print "That was your last chance buddy"
else:
print attraction[answer]
if answer not in ("approach", "introduction", "qualification", "rapport"):orexpression instead of `and' because single input can't be of 3 different type.if answer not in attraction.keys():