# Author: Scott Wehrwein
# Date: 2025/11/12
# A letter grade calculator to demonstrate testing concepts.

def letter_grade(score):
    """ Calculate the letter grade corresponding to the given score.
    Precondition: score is a float between 0 and 100.
    Returns a letter grade as a string according to the usual ranges:
        F for scores less than 60
        D for scores from 60 (inclusive) up to 70 (exclusive)
        C for scores from 70 (inclusive) up to 80 (exclusive)
        B for scores from 80 (inclusive) up to 90 (exclusive)
        A for scores 90 or above
    """
    if score <= 60:
        return "F"
    elif score <= 70:
        return "D"
    elif score <= 80:
        return "C"
    elif score <= 90:
        return "B"
    else:
        return "A"