def calculate_nps(scores):
    """Takes in a list of floats and returns the Net Promoter Score based
       on those scores.

       Args:
         scores -- list of floats representing scores
       Returns:
         float -- Net Promoter Score from -100.0 to +100.0
    """
    detractors, promoters = 0, 0
    for s in scores:
        if s <= 6:
            detractors += 1
        if s >= 9:
            promoters += 1
    # below we calculate the Net Promoter Score with this formula
    nps = (float(promoters) / len(scores) - \
           float(detractors) / len(scores)) * 100
    return nps