title: Return to Previous Variable with If/Else/Elif
body: <p>So I am working on a coding project as I learn python. It is a relatively simple Choose Your Own Adventure game. I thought I had everything laid out properly, but when the user chooses &quot;swim&quot; for var choice2, it should give the game over message and terminate. However, when I run it and choose &quot;swim&quot; for choice2, it gives the Game Over message, but then moves on to choice11 input. I cannot for the life of me figure out what I am doing wrong. Code below:</p>
  <pre><code>print(&quot;Welcome to Treasure Island.&quot;)
  print(&quot;Your mission is to find the treasure.&quot;)
  
  choice1 = input(&quot;You\'re at a crossroad. There are three paths here. Do you want to go west, east, or south?&quot;).lower()
  
  if choice1 == &quot;west&quot;:
      choice2 = input(&quot;You have entered a forest clearing, with a lake in the middle. Do you wait for the ferry, &quot;
                      &quot;swim across, or go back east?&quot;).lower()
      if choice2 == &quot;wait&quot;:
          choice3 = input(&quot;You board the ferry and it takes you across the lake. &quot;
                          &quot;You see a house. Do you enter or return across the lake?&quot;).lower()
          if choice3 == &quot;enter&quot;:
              print(&quot;It is dark inside the house. Suddenly you hear a growl as the light flares. &quot;
                    &quot;You are eaten by a grue. Game Over.&quot;)
          else:
              input(choice2)
      elif choice2 == &quot;swim&quot;:
          print(&quot;You attempt to swim across, but suddenly you are attacked by a lake monster. Game Over.&quot;)
      elif choice2 == &quot;east&quot;:
          input(choice1)
  if choice1 == &quot;east&quot;:
      print(&quot;You come to a dead end in the forest. You are struck by several arrows from nowhere. Game Over.&quot;)
  else:
      choice11 = input(&quot;You move down the path and come to a fork in the road. Do you continue south or go east?&quot;).lower()
      if choice11 == &quot;south&quot;:
          print(&quot;You come upon a treasure chest. When you open it, it is a mimic, with sharp nasty teeth. Game Over.&quot;)
      else:
          print(&quot;You come upon a veritable treasure hoard! You win!&quot;)
  </code></pre>