title: How do I insert a restart game option?
body: <p>I would like to have an option at the end of my dice game which says: </p>
  
  <blockquote>
    <p>Do you want to restart? Yes or No</p>
  </blockquote>
  
  <p>If the user types yes, the game restarts and this an infinite number of times, until the user has had enough of the game and quits.  </p>
  
  <p>I know you can do this with a loop, but how?  </p>
  
  <pre><code>import random
  
  print("Dice Game: try to roll a bigger number than the computer! Good luck!")
  
  print("Type 'go' to roll")
  dieroll = input()
  if dieroll == 'go':
      myNumber = random.randint(1,6)
      pcNumber = random.randint(1,6)
      print("You rolled " + str(myNumber))
      print("He rolled " + str(pcNumber))
      if myNumber &lt; pcNumber:
          print("You lose!")
      if pcNumber &lt; myNumber:
          print("You win!")
  </code></pre>