import math


def round_up_or_down(transactions, up=True):
    """Round the list of transactions passed in.
       If up=True (default) round up, else round down.
       Return a new list of rounded values
    """
    new_transact = []

    for num in transactions:
        if up:
            number_up = math.ceil(num)
            new_transact.append(number_up)
        else:
            number_down = math.floor(num)
            new_transact.append(number_down)
    return new_transact