Im new to python please help

I’m trying to make a text story game but everytime I run the code below and input “Yes” the code says no and if I enter it again it says yes and then I get a syntax error. However if I input “No” the code shows No and if I hit enter again it quits the code. Can someone explain why it’s doing this I want the game to continue after I say yes and quit if I say no.

input() if input(“No”): (quit()) if input(“Yes”): print(“Okay time to get started, you will have to go by yourself as I have no fighting experience”)

Each one of those inputs is a new input.

the argument you provide when calling input() is to inform the user what they are suppose to enter. So general something like:

input("Please enter yes or no: ")

you do nothing with the input provided by user yet.

I’m trying to make a text story game but everytime I run the code below and input “Yes” the code says no and if I enter it again it says yes and then I get a syntax error. However if I input “No” the code shows No and if I hit enter again it quits the code. Can someone explain why it’s doing this I want the game to continue after I say yes and quit if I say no.
input() if input(“No”): (quit()) if input(“Yes”): print(“Okay time to get started, you will have to go by yourself as I have no fighting experience”)

https://tweakbox.mobi/ https://getappvalley.com/

Have a go at it in the terminal to play around with how to store your results!
(>>> is for your terminal input)

>>> test = input("Yes or no? ")
#Output:
Yes or no? #user input: Yes
>>> test
#Output:
'Yes'
>>> test2 = input("Yes or no? ")
#Output:
Yes or no? #user input: No
>>> test2
#Output:
'No'
>>> test
'Yes'
>>> test2
'No'
>>> test
'Yes'
>>> test2
'No'
#etc