Computer Science, asked by sangeytsering1832, 1 year ago

Define a python function progression(l) that takes a nonempty list of integers l and returns true if the integers in l form an arithmetic progression: that is, l is of the form [a,a+d,a+2d,â¦,a+kd].

Answers

Answered by fl1xter
0

Here is a code that checks for an arithmetic sequence. The numbers don't have to be integers if you want to expand the scope of the sequence. Simply enter the progression into the sequence = [ . . . ] at the bottom and execute.

Hope this helps!

Attachments:
Similar questions