def student_average(grades: list) -> float:
    """Return the weighted average of a student's grades.

    You may ASSUME that:
        - grades consists of exactly three float values
    """
    # Sort the student's grades
    sorted_grades = sorted(grades)

    # These are the weights for the assignment grades
    weights = [0.25, 0.35, 0.4]

    return (
        weights[0] * sorted_grades[0] +
        weights[1] * sorted_grades[1] +
        weights[2] * sorted_grades[2]
    )