title: Python Code, name is not defined error
body: <p>I am attempting to reference the <code>student_avg</code> function in the <code>letter_grade</code> function, but it seems that the <code>student_avg</code> parameter is not recognized. </p>
  
  <pre><code>lloyd = {
      "name": "Lloyd",
      "homework": [90.0, 97.0, 75.0, 92.0],
      "quizzes": [88.0, 40.0, 94.0],
      "tests": [75.0, 90.0]
  }
  alice = {
      "name": "Alice",
      "homework": [100.0, 92.0, 98.0, 100.0],
      "quizzes": [82.0, 83.0, 91.0],
      "tests": [89.0, 97.0]
  }
  tyler = {
      "name": "Tyler",
      "homework": [0.0, 87.0, 75.0, 22.0],
      "quizzes": [0.0, 75.0, 78.0],
      "tests": [100.0, 100.0] 
  }
  
  def average(numbers):
      total = sum(numbers)
      total = total/len(numbers)
      return total
  
  def student_avg(student):
      """Returns weighted average"""
      homework = average(student['homework']) * 10/100
      quizzes = average(student['quizzes']) * 30/100
      tests = average(student['tests']) * 60/100
      return homework + quizzes + tests
  
  def lett_grade(studentname):
   """   Gets the students letter grade A-F"""
  if student_avg(studentname)  &gt;= 90:
      print('A')
  elif 90 &gt; student_avg(studentname) &gt;= 80:
      print('B')
  elif 80 &gt; student_avg(studentname) &gt;= 70:
      print('C')
  elif 70 &gt; student_avg(studentname) &gt;= 60:
      print('D')
  else:
      print('F')
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/Anthony/Documents/class.py", line 34, in &lt;module&gt;
    if student_avg(studentname)  &gt;= 90:
  NameError: name 'studentname' is not defined
  </code></pre>
  
  <p>Also, why is it that I am not supposed to indent the <code>if</code>/<code>elif</code> statements in the last function? I indented everything else in the previous two functions – is it just the syntax? </p>