title: Repeating an input if the output is false
body: <p>I want to make a "guess the number" game in python where i choose the minimum and maximum number and i want it to repeat the question if the number i chose is lower or higher, how can i do that?</p>
  
  <p>here's my code:</p>
  
  <pre><code>import random
  import time
  
  print("Welcome to the guessing game!")
  
  time.sleep(1)
  
  print("Choose your minumum number")
  
  minnum=input("Min: ")
  
  print(" ")
  
  print("Choose your maximum number")
  
  maxnum=input("Max: ")
  
  print(" ")
  
  print("Enter your number")
  
  num = input("Number: ")
  
  print(" ")
  
  q = random.randint(int(minnum), int(maxnum))
  
  def game():
      if int(num) &lt; q:
          print("The number is higher")
  
      if int(num) &gt; q:
          print("The number is lower")
  
      if int(num) == q:
          print("Congratulations! you won!")
          break
  game()
  print(" ")
  print(" ")
  input("Press enter to exit")
  </code></pre>