0

I am somewhat new to python and am struggling with fixing this problem. I am currently making a simple story game but have ran into a problem, usually when I type No or no in the input the if statement is meant to read that I said no and print a sad face but instead of doing that it prints a happy face and a sad face. The happy face is only meant to show when I have entered Yes or yes. Any help would be very much appreciated. I am using python 3.10.4 on windows 10.

The code:

inv_List = []
playerName = input("Enter your name: ")

print(playerName + " has decided to go on a journey. ")
journeyOption = input("Should "+playerName+" go on a journey?: ")

def journey_Agreed():
    print(":)")
    return

def journey_Disagreed():
    print(":(")
    return

def check_journey_option():
    if journeyOption== "Yes" or "yes":
        journey_Agreed()
    if not journeyOption== "Yes" or "yes":
        journey_Disagreed()
    return
check_journey_option()

I have already tried to replace "if not" with else and elif but those didn't even bring up a sad face they only brought up a happy face when I said no.

OddsOver1
  • 13
  • 4

0 Answers0