Solutions will be available when this assignment is resolved, or after a few failing attempts.

Get grade letter

Define a function get_grade_letter that receives a score and you should return:

'A' if the score is 90 or above

'B' if the score is 80 to 89

'C' if the score is 70 to 79

'D' if the score is 60 to 69

'F' if the score is less than 60


>>> get_grade_letter(93)
>>> get_grade_letter(80)
>>> get_grade_letter(75)
>>> get_grade_letter(67)
>>> get_grade_letter(42)

Test Cases

test F score - Run Test

def test_F_score():
    assert get_grade_letter(42) == 'F'

test C score - Run Test

def test_C_score():
    assert get_grade_letter(75) == 'C'

test A score - Run Test

def test_A_score():
    assert get_grade_letter(93) == 'A'

test B score - Run Test

def test_B_score():
    assert get_grade_letter(80) == 'B'

test D score - Run Test

def test_D_score():
    assert get_grade_letter(67) == 'D'
def get_grade_letter(score): pass