Created
May 30, 2015 03:24
-
-
Save junmakii/b7ba554175ebde368072 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
| def get_sequence_of_numbers_with_common_difference(m, n, seq=' '): | |
| a = [] | |
| i = m | |
| a.append(i) | |
| while len(a) < 10: | |
| i = i + n | |
| a.append(i) | |
| b = [str(j) for j in a] | |
| s = seq.join(b) | |
| return s | |
| print(get_sequence_of_numbers_with_common_difference(5, 3)) # 5 8 11 14 17 20 23 26 29 32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment