i am making a choose your own adventure game and need help with the coding. i am mid way throught, and tried to play it so far but some of the outcomes dont work. i would like someone to help me fix the coding rather than tell me whats wrong. here is the coding:
#this is a choose your own adventure game import time#makes it possible to have time delay def wait(): time.sleep(1) def intro(): print ('Hello!') wait()#makes a time delay print ('Ok') wait() adventure = input('Do you want to start the adventure???') print ('') if adventure == 'yes' or adventure == 'Yes' or adventure == 'yeah' or adventure == 'Yeah': print ('Ok, lets get started!') elif adventure != 'yes' or adventure != 'Yes' or adventure != 'yeah' or adventure != 'Yeah': print ("That's lame. I'll just pretend you said yes...")#starts the game wait() print('') name = input('First, what is your name?') print('') wait() print ('Ok lets get started ' + name) wait() print('') print ('You have been sent by your kingdom to slay a dragon! If you come home victorious you will be crowned king! This, however, is a challenge no one has ever come home from...') wait() print('') print('You must either bring back the dragons head or some of the dragons treasure.') wait() print('') print ('You will have to make many decisions that will affect your adventure throughout the game. Some may be good and some may be bad...') wait() print('') print ('You start your adventure in your kingdom...')#finishes intro and starts the adventure wait() travel() def travel(): print('') print ('You have been sent on your quest and first have to get to the cave.') print('') choice1 = input("you have 2 options: enter 'a' for going via a boat or enter 'b' for going via horse.")#this decided how to travel to the cave print('') if choice1 != ('a') and choice1 != ('b'): print ('this is not a valid option try again')#invalid travel() elif choice1 == ('a') or choice1 == ('b'): print('') print ('Ok!') tunnel() def tunnel(): print('') wait() choice2 = input("You have arrived outside the cave... you walk inside and see two tunnels. Enter 'a' for the right tunnel or Enter 'b' for the left tunnel.") print('') if choice2 != ('a') and choice2 != ('b'): #second choice print ('this is not a valid option try again') tunnel() elif choice2 == ('a') or choice2 == ('b'): print ('Ok!') noexit() def noexit(): print('') wait() choice3 = input("You enter the tunnel...BANG!!!...A metal door closes behind you. Enter 'a' to continue walking or Enter 'b' to try to find a way to open the door.") print('') if choice3 != ('a') and choice3 != ('b'): print ('this is not a valid option try again') noexit() if choice3 == ('b'): noexit1() if choice3 == ('a'): print ('ok') torch() def noexit1(): if choice3 == ('b') and choice2 == ('a'): print ('You start to search around the door looking for a switch, when you hear a very loud roar...you turn around and realise you are facing the dragon... you start to raise your sword, but its too late, the dragon kills you :-(.') restart() elif choice3 == ('b') and choice2 == ('b'): print ('You start to search around the door looking for a switch, when you feel a button.') print('') wait() choice5 = input("Do you press it? Enter 'a' to press it or Enter 'b' to leave it and continue looking.") if choice5 != ('a') and choice5 != ('b'): print ('this is not a valid option') noexit() if choice5 == ('a'): button() if choice5 == ('b'): buttonorswitch() def button(): print ('You press the button and...nothing happened! You stand up and look around - sundenly the floor opens up beneath you and you fall to your death') restart() def buttonorswitch(): choice6 = ("You continue looking and find a switch. You decide to either press the button or the switch. Enter 'a' to press the button or Enter 'b' to flick the switch") if choice6 != 'a' and choice6 != 'b': print ('this is not a valid option') buttonorswitch() elif choice6 == 'a': button() elif choice6 == 'b': switch() def switch(): print ('You flick the switch and...the door opened! But thats not it...another door openes which reveals loads of treasure!') treasurehome() def torch(): print ('') wait() print ('as you continue, you notice the way ahead is darker.') choice4 = input("Do you pick up a torch? Enter 'a' for yes and Enter 'b' for no.") if choice4 != ("a") and choice4 != ("b"): print('This is not a valid option try again') torch() def restart(): startover = input('do you want to try again?') if startover == ('yes') or startover == ('y') or startover == ('ok'): intro() elif startover == ('no') or startover == ('nope') or startover == ('n'): quit() else: print ('that is not a valid option try again') restart() def treasurehome(): print ('You return home with loads of treasure and become the king!') restart() intro()