Create a function called "number_sequence" that takes in three parameters: "start", "end", and "step". The function should return a list of numbers between the "start" and "end" numbers, with each number being incremented or decremented by the "step" value. The "start" and "end" numbers are inclusive.

Here's an example:
start = 1
end = 10
step = 3

The expected output is [1, 4, 7, 10].

To solve this problem, you can follow these steps:

1. Create an empty list called "sequence" to store the numbers.
2. Determine the direction of the sequence based on the "step" value. If the "step" is positive, the sequence should be increasing. If the "step" is negative, the sequence should be decreasing.
3. Use a loop to iterate through the numbers from the "start" to the "end", with each iteration incrementing or decrementing the current number by the "step" value.
4. Add each number to the "sequence" list.
5. Return the "sequence" list as the final output.

Note: The step value can be zero. In this case, the function should return an empty list.

Here's the implementation of the "number_sequence" function in Python:

def number_sequence(start, end, step):
    sequence = []
    
    if step > 0:
        for num in range(start, end+1, step):
            sequence.append(num)
    elif step < 0:
        for num in range(start, end-1, step):
            sequence.append(num)
    
    return sequence

print(number_sequence(1, 10, 3))  # Output: [1, 4, 7, 10]
Here's an alternative implementation of the "number_sequence" function in Python:

def number_sequence(start, end, step):
    sequence = []
    
    if step > 0:
        num = start
        while num <= end:
            sequence.append(num)
            num += step
    elif step < 0:
        num = start
        while num >= end:
            sequence.append(num)
            num += step
    
    return sequence

print(number_sequence(1, 10, 3))  # Output: [1, 4, 7, 10]