title: Using def and return in python 3
body: <p>i am trying to use def and return in python 3, which will check if a number is higher than another and then return status as either True or False. However, i can't seem to make this work. When i run it, i get a nameError. The code is like this:</p>
  
  <pre><code>on_off_status=600
  
  def Status(data):
      if data &lt;= on_off_status:
          status = True
      elif data &gt; on_off_status:
           status = False
      return (status)
  
  
  while True:
      data=int(input("what is the status?: "))
      Status(data)
  
      print (status)
  </code></pre>
  
  <p>I want to be able to use the status as True or False in another piece of code, which comes later.</p>
  
  <p>Any help is appreciated.</p>