title: int(input()) error - NameError: name '…' is not defined
body: <p>I am getting an error when I try to run this simple python script:</p>
  
  <pre><code>def ask_x():
      x = int(input('What is X?'))
  
  def ask_y():
      y = int(input('What is Y?'))
  
  def result():
      print(z)
  
  def count():
      if (x&gt;10):
          z = x + y
      else:
          z = 0
          print('nono')
  
  
  #start of program
  ask_x()
  ask_y()
  count()
  result()
  </code></pre>
  
  <p>I am using Python 3. I tried searching the forum and found <a href="https://stackoverflow.com/questions/21122540/input-error-nameerror-name-is-not-defined">Stackoverflow - input() error - NameError: name '…' is not defined
  </a> but it doesn't work for me.</p>