Created
May 30, 2015 03:21
-
-
Save junmakii/eb3e066c77cee2e8197a 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
| import string | |
| 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 = string.join(b, seq) | |
| 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