Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save junmakii/b7ba554175ebde368072 to your computer and use it in GitHub Desktop.

Select an option

Save junmakii/b7ba554175ebde368072 to your computer and use it in GitHub Desktop.
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