title: Calculate final letter grade in Python given 4 test scores
body: <p>The question I have is asking me about final grades given 4 parameters (3 tests worth 20% and 1 final worth 40%) scored on a scale of 0 to 100 points. The function is supposed to be as simple as printing finalGrade(test1, test2, test3, final) which will output a letter grade depending on the score. I don't need to have the user input anything however I'm going to experiment once I have this basic code figured out.</p>
  
  <p>This is my code so far:</p>
  
  <pre><code>def grader(testOne, testTwo, testThree, finalExam):
      first = testOne * .20
      second = testTwo * .20
      third = testThree * .20
      fourth = finalExam *.40
      finalGrade = first + second + third + fourth
      return finalGrade
  
  def ?? (??):
      if grade &gt;= 90 and &lt;= 100:
          return("You received an A")
  
      elif grade &gt;= 80 and &lt; 90:
          return("You received a B")
  
      elif grade &gt;= 70 and &lt; 80:
          return("You received a C")
  
      elif grade &gt;= 60 and &lt; 70:
          return("You received a D")
  
      else grade &lt; 60:
          return("Sorry, you received an F")
  
  print(testOne, testTwo, testThree, finalExam) #will replace with values
  </code></pre>