Simple Python code for a starter
<p>I am trying to write a code that a user can input raw data that will pull up a numerical grade from a list, AND pair that numerical value with a letter grade. ie: the fourth grade in the list is 86, so it will PRINT 86 as well as the letter grade B.</p>

<p>Here is what I have so far:</p>

<hr>

<pre><code>grades = ['62','68','93','75','89','85']

print grades [3]

def lettergrade (grades):

    if grades &gt;=90:
        print('A')
    elif grades &gt;=80 and grades &lt;90:
        print('B')
    elif grades &gt;=70 and grades &lt;80:
        print('C')
    elif grades &gt;=60 and grades &lt;70:
        print('D')
    else:
        print('F')


print lettergrade (grades)
</code></pre>

<p>The problem that you are experiencing is <code>grades</code> contains only Strings. '1' is a String just like 'hello'. In python, Strings will not be equal to numbers, so comparing them will always be false. In addition, you are comparing the entirety of <code>grades</code> to a number, which will also evaluate to <code>false</code>. The comparison that you are looking for is <code>if(grades[index]&gt;= 90):</code> where <code>index</code> is whatever index you are looking at.</p>

<p>The <code>print()</code> statement inside <code>lettergrade()</code> will only print out the grade, so change each print statement to `print('LETTER:' + value).</p>

<p>In addition, the method <code>lettergrade()</code> will only print out one thing, so there needs to be a loop to call it multiple times, with multiple values:</p>

<pre><code>for value in grades:
    lettergrade(value)
</code></pre>

python list