title: Python User Input Average
body: <p>I'm trying to work on a school assignment that asks the user to input 3 integers, then I need to pass these three integers as parameters to a function named <strong>avg</strong> that will return the average of these three integers as a float value.  </p>
  
  <p>Here's what I've come up with so far, but I get this error:</p>
  
  <pre><code>line 13, in &lt;module&gt;
      print (average)
  NameError: name 'average' is not defined  
  </code></pre>
  
  <p>Advice?</p>
  
  <pre><code>    a = float(input("Enter the first number: "))
      b = float(input("Enter the second number: "))
      c = float(input("Enter the third number: "))
  
      def avg(a,b,c):
          average = (a + b + c)/3.0
          return average
  
  
      print ("The average is: ")
      print (average)
  
      avg()
  </code></pre>