title: Issue with Python while loop not ending
body: <p>I have an issue with my python code to make beeping noises.
  It just does an infinite loop of beeps even though it should stop.</p>
  
  <pre><code>import winsound
  import time
  z = 1
  while z == 1:
      b = input('Enter number of beeps required')
      print(b)
      a = input('Is this number correct?')
      if a == "yes":
          print('Python shall use this number')
          z = 2
      if a == "no":
          b = input('Enter number of beeps required')
  x = 1
  y = -1
  while x == 1: 
      freq = 1500
      dur = 50
      winsound.Beep(freq,dur)
      y += 1
      if y == b:
          x = 2
  </code></pre>
  
  <p>Thanks for any help</p>