title: How do I use variables from another function?
body: <p>This here is my code:</p>
  
  <pre><code>def Area():
      area = pi * radius * radius
      pi = 3.14
      radius = diameter * 2
  
  def cost():
      diameter = eval(input("diamater: "))
      print ("Area is", area)
  cost()
  </code></pre>
  
  <p>it says area is not defined but I have a variable called area!</p>