title: Rolling 2 dice in Python and if they are the same number, roll again, and continuing
body: <p>So I need to write a Python program where I need to roll 2 dice and print the sum of the 2 dice. I got this so far:</p>
  
  <pre><code>import random
  def monopoly():
  x = random.randrange(1,7)
  y = random.randrange(1,7)
  while True:
      if x != y:
          print(x, '+', y, '=', x+y)
          break
  </code></pre>
  
  <p>Now, every time the 2 dice numbers are the same (2 + 2 or 3 + 3 etc.) You can throw again. If 3 times in a row the dice are the same, you need to go to jail. I thought I had to work with a while loop using continue like this:</p>
  
  <pre><code>    else:
      if x == y:
          print(x + y)
          continue
  #continuation of the code above
  </code></pre>
  
  <p>Now if I do have an outcome where the dice are the same it keeps printing out the sum over and over again until I stop the program myself. But I don't know why.</p>
  
  <p>How do I fix This?, because I have no idea how to do this.</p>