variable value causing premature exit from program
<p>I'm working on a simple game program but am having trouble with the initial start of the game. I have three functions set up: Start, game, end. The problem is that once the program creates the functions, it then terminates because there is no restart to pass through the functions again.</p>

<p>Here's the last function, gameEnd:</p>

<pre><code>def gameEnd ( ):
       print ('Would you like to play again? Y/N.')
       playAgain = ''     **part of the problem is here; the computer reads playAgain as **
       input (playAgain)    **''. Because playAgain is not equal to Y or y, the program **
       if playAgain == 'Y' or 'y':   **exits without ever starting. I need to move **
           gameCore                  **playAgain somewhere logical.**

       else:
          print ('You won Caves of Doom, Caves of Delight ' + wins + ' times.')
          print ('You lost Caves of Doom, Caves of Delight ' + losses + ' times.')
          if wins &gt; losses:
              print ('Good for you. You have a winning record!')

       elif wins == losses:
              print ('Well, you did okay; neither good nor bad.')

       elif wins &lt; losses:
              print ('Tough luck. You have a losing record.')
              time.sleep (1) 
              print ('Farewell, ' + name + ',' + ' and may we meet again sometime soon.')
</code></pre>
