# Code
def func(x, y):
d = (y-x)/3 # divides the difference in 3 equal parts
return [x, x+d, x+2*d, y] # returns the series as a list
print(func(1, 9))
print(func(4, 8))
print(func(4, 10))
print(func(1, 7))
# Output
[1, 3.6666666666666665, 6.333333333333333, 9]
[4, 5.333333333333333, 6.666666666666666, 8]
[4, 6.0, 8.0, 10]
[1, 3.0, 5.0, 7]