title: While loop that prints a random number between 1 and 10 and stops when the number is N
body: <p>This is what I've got, but this only generates a random number once and prints that number infinitely:</p>
  
  <pre><code>import random
  
  x = random.randint(0,10)
  y = 7
  while x != y:
      print(x)
  </code></pre>