def get_score(evaluated_variable, max_variable, scores):
    """
    Calculate the score from the evaluated_variable.

    Args:
        evaluated_variable: Float of the variable to be scored.
        max_varibale: Float of the maximum value that needs to be undershoot to
                      score.
        scores: List of Floats of the returned scores (length should be 4).
    Returns:
        The score, that one gets for the evaluated_variable.
    """
    if evaluated_variable > max_variable:
        return scores[0]
    elif evaluated_variable > 0.5 * max_variable:
        return scores[1]
    elif evaluated_variable > 0.1 * max_variable:
        return scores[2]
    else:
        return scores[3]