I'm not sure why this isn't working, but I have a feeling it has something to do with how I've structured the while loop. I want the loop to continue only if the user inputs something other than the two choices they have. However, even when I test it with putting in either of the two correct choices, the while loop continues.
prompt = "> "
print "Welcome to the converter. What would you like \
to convert? (temp or distance)"
choice = raw_input(prompt)
while (choice != "temp" or choice != "distance"):
print "Sorry, that's not an option"
choice = raw_input(prompt)
if choice == "temp":
print "temp"
elif choice == "distance":
print "distance"
What am I missing here? Thanks in advance.
ifstatement to be part of thewhileloop, you need to put it at the same indentation level.