title: Return doesn't work (python)
body: <p>I've been having some problems with the return statement and I can't seem to figure out what's wrong. It seemed to work fine yesterday, but today no function that contains it seems to work properly. Here's an example of what's going on:</p>
  
  <pre><code>def fpol(x):
      y=x**4
      return(y)
  </code></pre>
  
  <p>If I then type in</p>
  
  <pre><code>fpol(4)
  </code></pre>
  
  <p>I'm given the answer 256 (as I would expect). If I then type in</p>
  
  <pre><code>print(y)
  </code></pre>
  
  <p>or try to use/view y in any way, I'm told</p>
  
  <pre><code>NameError: name 'y' is not defined
  </code></pre>
  
  <p>I've also tried it with return(y) being replaced by return y . I can also insert print(y) into the original function and that works fine, so I know that during the function, y actually does have a value, it's just not being returned. Any help is much appreciated.</p>
  
  <p>Edit: I've now been able to work past the issue I had with the return function. Thanks to everyone who responded.</p>