Skip to content

Instantly share code, notes, and snippets.

@computer-tutor
Created April 28, 2020 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save computer-tutor/70ee8d1721be3f147a5ba5db29a41c0b to your computer and use it in GitHub Desktop.
Save computer-tutor/70ee8d1721be3f147a5ba5db29a41c0b to your computer and use it in GitHub Desktop.
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