title: Grade Marking Python Program, Not Expected Output
body: <p>Here are the rules to my assignment:
  You have access to a database of student_scores in the format of a dictionary. The keys in student_scores are the names of the students and the values are their exam scores.</p>
  <p>Write a program that converts their scores to grades. By the end of your program, you should have a new dictionary called student_grades that should contain student names for keys and their grades for values. The final version of the student_grades dictionary will be checked.</p>
  <p>DO NOT modify lines 1-7 to change the existing student_scores dictionary.</p>
  <p>This is the scoring criteria:</p>
  <p>Scores 91 - 100: Grade = &quot;Outstanding&quot;</p>
  <p>Scores 81 - 90: Grade = &quot;Exceeds Expectations&quot;</p>
  <p>Scores 71 - 80: Grade = &quot;Acceptable&quot;</p>
  <p>Scores 70 or lower: Grade = &quot;Fail&quot;</p>
  <p>Expected Output
  '{'Harry': 'Exceeds Expectations', 'Ron': 'Acceptable', 'Hermione': 'Outstanding', 'Draco': 'Acceptable', 'Neville': 'Fail'}'</p>
  <hr />
  <p>Here is my code:</p>
  <pre><code>student_scores = {
    &quot;Harry&quot;: 81,
    &quot;Ron&quot;: 78,
    &quot;Hermione&quot;: 99, 
    &quot;Draco&quot;: 74,
    &quot;Neville&quot;: 62,
  }
  #  Don't change the code above 
  
  #TODO-1: Create an empty dictionary called &quot;student_grades.&quot;
  
  
  #TODO-2: Write your code below to append the grades to student_grades.
  student_grades = {}
  gradeslist = []
  for student in student_scores:
      if student_scores[student] &lt;= 100 and student_scores[student] &gt;= 91:
          gradeslist.append(&quot;Outstanding&quot;)
      elif student_scores[student] &lt;= 90 and student_scores[student] &gt;= 81:
          gradeslist.append(&quot;Exceeds Expectations&quot;)
      elif student_scores[student] &lt;= 80 and student_scores[student] &gt;= 71:
          gradeslist.append(&quot;Acceptable&quot;) 
       
      else:
          gradeslist.append(&quot;Fail&quot;)  
  
  for key in student_scores:
      for num in range(0, len(student_scores)-1):
          student_grades[key] = gradeslist[num] 
      
  
  #  Don't change the code below 
  print(student_grades)
  </code></pre>
  <hr />
  <hr />
  <p>OUTPUT
  {'Harry': 'Acceptable', 'Ron': 'Acceptable', 'Hermione': 'Acceptable', 'Draco': 'Acceptable', 'Neville': 'Acceptable'}</p>
  <p>Why Is This Happening?</p>