Created
February 3, 2019 08:50
-
-
Save dev001hajipro/2a2486e186bcbd9754fd8880096ed837 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# a initial term | |
# d common_difference | |
def arithmetic_progression(a = 0, d = 0, n = 1): | |
print(a + (d * (n-1))) | |
return a + (d * (n-1)) | |
def main(): | |
nnn = [arithmetic_progression(5, 2, i) for i in range(1,10)] | |
print(nnn) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment