title: Calculates the GPA of each student
body: <p>so I have the below code (grading program) that works fine however, when I input a mark of 100 instead of returning a value of 'HD' its returning an 'F'</p>
  <h2>Calculates the GPA of each student.</h2>
  <h2>Author: M. Ployee</h2>
  <h2>Last Modified: 30/08/2022</h2>
  <h2>Contributors: Jalal Massadi</h2>
  <h3>M. Ployee</h3>
  <p>#Blank variable to store user input and GPA</p>
  <p>totals = []</p>
  <p>letters = []</p>
  <p>#Get and store user input</p>
  <p>print (&quot;Please enter the grade for each student, or press q to quit&quot;)</p>
  <p>while(True):</p>
  <pre><code>user_input = input(&quot;&gt; &quot;)
  
  if(user_input.lower() == &quot;q&quot;):
  
      break
  
  totals.append(user_input)
  </code></pre>
  <p>#Caclulate letter grade for each user response</p>
  <p>for total in totals:</p>
  <pre><code>if total &lt;= &quot;59&quot;:
  
      letters.append(&quot;F&quot;)
  
  elif total &lt;= &quot;69&quot;:
  
      letters.append(&quot;P&quot;)
  
  elif total &lt;= &quot;79&quot;:
  
      letters.append(&quot;C&quot;)
  
  elif total &lt;= &quot;89&quot;:
  
      letters.append(&quot;D&quot;)
  
  else:
  
      letters.append(&quot;HD&quot;)
  </code></pre>
  <p>#Print GPA results.</p>
  <p>print (&quot;The GPA for your students is: {}&quot;.format(letters))</p>