title: Python Program - Use a while loop to calculate the amount of letter grades from user input
body: <p><strong>I wrote some code for the following problem:</strong></p>
  
  <p><em>"Write a program to continuously asks the user an exam score given as integer percentages in the range 0 to 100. Calculate the total number of grades in each letter-grade category as follows: 90 to 100 is an A, 80 to 89 is a B, 70 to 79 is a C, 60 to 69 is a D, and 0 to 59 is an F. Use a negative score as a sentinel value to indicate the end of the input. (The negative value is used only to end the loop, so do not use it in the calculations.)"</em></p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>count = 0
  gradeA = 0
  gradeB = 0
  gradeC = 0
  gradeD = 0
  gradeF = 0
  
  score = int(input("Enter an exam score: "))
  while score != -1:
      count = count + 1
      score = int(input("Enter an exam score: "))
  
  if score &gt;= 90 and score &lt;= 100:
      gradeA = gradeA + 1
  elif score &gt;= 80 and score &lt;= 89:
      gradeB = gradeB + 1
  elif score &gt;= 70 and score &lt;= 79:
      gradeC = gradeC + 1
  elif score &gt;= 60 and score &lt;= 69:
      gradeD = gradeD + 1
  elif score &gt;= 0 and score &lt;= 59:
      gradeF = gradeF + 1
  
  print ("You entered " + str(count) + " exam scores.")
  print ("Number of A's = " + str(gradeA))
  print ("Number of B's = " + str(gradeB))
  print ("Number of C's = " + str(gradeC))
  print ("Number of D's = " + str(gradeD))
  print ("Number of F's = " + str(gradeF))
  </code></pre>
  
  <p><strong>The issue is that when I run the code, the number of grades in each letter-grade category are all showing up as 0.
  How could I fix this so that the correct numbers are shown?</strong></p>