My if statement here in line 4 and 6 keep running even if the user inputs the correct word. I'm confused. Any suggestions? Have been trying to get this to work for a day now.
boi = input("Do you want to enter a part of a house or a word, (\"house part\" or \"word\")? ")
print(boi)
if boi != "house part":
print("I do not understand", boi +".")
elif boi != "word":
print("I do not understand", boi + ".")
if boi == "house part":
hp = input("Please enter a part of a house: ")
print(hp)
if hp == "basement":
print("calf")
elif hp == "wall":
print("skin")
elif hp == "attic":
print ("hip")
elif hp == "kitchen":
print("abdomen")
elif hp == "study":
print("wrist")
else:
print("I do not know anything about a(n)", hp + ".")
elif boi == "word":
w = input("Please enter a word: ")
print(w)
if w == "attorney":
print("macilmud")
elif w == "chicken":
print("sleent")
elif w == "consider":
print("floria")
elif w == "application":
print("sailinexemy")
elif w == "prepare":
print("capied")
else:
print("I do not know anything about a(n)", w + ".")
print("I do not understand", boi +".")is guaranteed to print based on the logic you've given. You probably meanif boi != "house part" and boi != "word":instead of two separate branches. Welcome to SO, BTW.