title: How to get Python to stop at a certain number while showing "iterations"
body: <p>My assignment is to write a Python script that uses <code>random</code> to generate a random number inside a loop, and that loop keeps running until it generates a 4.00 gpa. I was able to see a demo of what the final assignment is suppose to look like. </p>
  
  <p>Right now I am stuck with</p>
  
  <pre><code>while True:
     x = random.uniform(1,4)
     print(x)
     if x ==(4):
         break
  </code></pre>
  
  <p>When I run my code, it looks nothing like the demo the professor shows
  <a href="https://i.stack.imgur.com/tlxBt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tlxBt.png" alt="enter image description here"></a></p>