def make_2d_constant_array(width, height, value):
    """
    Create a width-by-height array with each cell as a given value.

    For example, the call make_2d_constant_array(5, 5, 0) would return:

        [[0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0]]

    Arguments:
        width: the width of the array
        height: the height of the array
        value: the value to fill the array with

    Returns: the new array
    """
    return [[value for x in range(width)] for y in range(height)]