def split(total, num_people):
    """
    Splits a total to the nearest whole cent and remainder
    Total is a Money() type so no need to worry about floating point errors
    return (2-tuple): base amount owed, remainder of cents which couldn't be evenly split

    Example: >>> split(1.00, 6) 
    (0.16, 0.04)
    """
    base = total * 100 // num_people / 100
    extra = total - num_people * base
    assert base * num_people + extra == total, "InternalError:" + \
    " something doesnt add up here: %d * %d + %d != %d" %(base, num_people, extra, total)
    return base, extra