Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment