Problems with my first python script
<p>I am trying to write a simple grading script based off an existing script that i found in a tutorial online. The goal is to ask the user their score and give the corresponding grade.</p>

<p>Here is the original code:</p>

<pre><code>def letterGrade(score):
    if score &gt;= 90:
        letter = 'A'
    else:   # grade must be B, C, D or F
        if score &gt;= 80:
            letter = 'B'
        else:  # grade must be C, D or F
            if score &gt;= 70:
                letter = 'C'
            else:    # grade must D or F
                if score &gt;= 60:
                    letter = 'D'
                else:
                    letter = 'F'
    return letter
</code></pre>

<p><strong><em>this btw didnt work at all and i really dont get the "def" command since its not mentioned again? No errors</em></strong></p>

<p>Anyway, here is my new modified code from what i have been learning from books and online...</p>

<pre><code>score = float(input("What is your score"))
if score &gt;= 90:
    letter = 'A'
else:   # grade must be B, C, D or F
    if score &gt;= 80:
        letter = 'B'
    else:  # grade must be C, D or F
        if score &gt;= 70:
            letter = 'C'
        else:    # grade must D or F
            if score &gt;= 60:
                letter = 'D'
            else:
                letter = 'F'
print (letter)
input ("Press Enter to Exit")
</code></pre>

<p><strong><em>This code doesnt work either, but at least it is asking for user input now.  No errors</em></strong></p>

<p>What am i missing here?</p>

<p>Omg hoooooooooooly crap!  I need to apologize for wasting everyone's time. RPGillespie was correct, my code was working this entire time.  Im new to using PyCharm and for some reason its set up in a way that you can be doing code at the top for one project, but actually "running" the code for a different project at the bottom.  Iv been running the wrong code this entire time...day wasted!!! =(</p>

<p>I will say that i wont be making that mistake anymore.  Geez, what a fiasco!!!</p>

<p>Thanks again for EVERYONE'S help and warm welcome.  I will admit that as i am new to this forum, i am not new to forums in general.  And its nice to not get eaten alive for asking a "noob" question or not knowing the un spoken rules of said forum.  Its nice to find a place that actually tries to help its members.</p>

<p>My sincerest apologies again, i promise my next problem/question wont be wasting this forums time =).</p>

<p>iv undoubtedly earned the badge of "DOH" and "Facepalm".</p>

python