View the step-by-step solution to:

# Problem : Write a function that given a list of numbers , returns True if and only if all of the numbers in the list form an arithmetic progression ,...

What is the answer in these 2 problems? I thought for hours, I really can't think of an answer. I was going to use n, n+1 or n-1 to compare and find the answer, but I don't know how to write the code.

Problem : Write a function that given a list of numbers , returns True if and only if all of the
numbers in the list form an arithmetic progression , that is the difference between any two
Successive numbers in the list is the same . Your main program should allow the user to enter
SPACE - Separated numbers as test lists , until a blank line is entered .
List : 1 2 3
True
List : 1 3 4
False
List : 3 2 1 0
ITUE
List : I
True
List : IT
TRUE
List : 10 9 8 7 4 3 2 1
False
List :

Problem : Write a function that given a list of numbers , returns the length of the longest
sequence of numbers within that list that forms an arithmetic progression . Your mail Program
should allow the user to enter space - separated numbers as test lists , until a blank line is centered .
List : 1 2 3
3
List : 1 3 4
2
List : 3 2 1 0
4
List : I
1
List : IT
2
List : 10 9 8 7 4 3 2 1
4
List :`

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents