Created
April 28, 2020 05:56
-
-
Save computer-tutor/70ee8d1721be3f147a5ba5db29a41c0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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