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>You need to be careful with indentation, python is a language indented.</p>

<p>Try this:</p>

<pre><code># define lettergrade function
def lettergrade(grades):
    if grades &gt;=90:
        return('A')
    elif grades &gt;=80 and grades &lt;90:
        return('B')
    elif grades &gt;=70 and grades &lt;80:
        return('C')
    elif grades &gt;=60 and grades &lt;70:
        return('D')
    else:
        return('F')

grades = ['62','68','93','75','89','85']

for grade in grades: # iterate in grades    
    # call to lettergrade function -&gt; lettergrade(grade)
    print(grade, ' equivalent ', lettergrade(grade)) 
</code></pre>

python list