Day 6Letter Grade

    Easyconditions

    Write grade(score) that returns a letter for a score from 0 to 100:

    90 and above is "A", 80 to 89 is "B", 70 to 79 is "C", 60 to 69 is "D", and below 60 is "F".

    Examples

    Example 1
    >>> grade(95)
    "A"
    Example 2
    >>> grade(72)
    "C"

    Good to know

    • Scores can have decimals, such as 89.5, which is a B.

    Run examples checks the 2 examples above. Submit runs all 9 tests, including hidden edge cases, and marks the challenge solved.

    solution.py
    Loading Python…

    Test results show up here

    Write grade in the editor, then run the examples. Use print() freely: its output is shown for each test.