Python - How to average user input value based on provided keys?
<p>I am attempting to write a script that allow users to submit letter grades for baseball prospects and have those grades averaged based on what users submit. </p>

<ol>
<li>User inputs grade for a prospect (B+ for prospect1)</li>
<li>All inputs are converted from lettergrades to numbergrades so they can be averaged. </li>
<li>Prospects are sorted by highest to lowest grades.</li>
<li>Grades are re-converted back to letter grades. </li>
</ol>

<p>I believe I have step 2 covered but I am iffy on how to complete the rest of the code.</p>

<p>To simplify things, let's say we are given a list of 5 prospects. Users will grade each of them. As each additional user adds their input of grades, the average grade of each prospect should be updated and the order of their ranking simultaneously sorted. </p>

<pre><code>prospects = ['prospect1', 'prospect2', 'prospect3', 'prospect4', 'prospect5']

grades = {'A+':98, 'A':95, 'A-':92, 'B+':88, 'B':85, 'B-':82, 'C+':78, 'C':75} #grading system where A+ = 98, A = 95 etc

def numbergrade(lettergrade):
    return grades[lettergrade] #function to convert lettergrade to numbergrade
</code></pre>

<p>How would you compile a list that would add an element every time there is a new user input and at the same time have the grade match the correct prospect? Should I be using a dictionary here?</p>
