import math


def round_away_from_zero(number, digits=0):
    """
    Round numbers using the 'away from zero' strategy as opposed to the
    'Banker's rounding strategy.'  The strategy refers to how we round when
    a number is half way between two numbers.  eg. 0.5, 1.5, etc. In python 2
    positive numbers in this category would be rounded up and negative numbers
    would be rounded down. ie. away from zero.  In python 3 numbers round
    towards even.  So 0.5 would round to 0 but 1.5 would round to 2.

    See here for more on floating point rounding strategies:
    https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules

    We want to continue to round away from zero so that student grades remain
    consistent and don't suddenly change.
    """
    p = 10.0 ** digits

    if number >= 0:
        return float(math.floor((number * p) + 0.5)) / p
    else:
        return float(math.ceil((number * p) - 0.5)) / p