56.1k views
5 votes
An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same. this in the sequence 1, 3, 5, 7, ..., the distance is 2 while in the sequence 6, 12, 18, 24, ..., the distance is 6. given the positive integer distance and the integers m and n, create a list consisting of the arithmetic progression between (and including) m and n with a distance of distance (if m > n, the list should be empty.) for example, if distance is 2, m is 5, and n is 12, the list would be [5, 7, 9, 11]. associate the list with the variable arith_prog.

User Hawklike
by
7.4k points

1 Answer

5 votes
1231233123123312312333
User Peilonrayz
by
7.2k points