Question: Create a Python function, named sequenceMax, which takes a list of numbers and returns the length of the longest sequence of equal consecutive elements. Return

Create a Python function, named sequenceMax, which takes a list of numbers and returns the length of the longest sequence of equal consecutive elements. Return 1 if there is none sequence. In the main part of the program, ask the user to enter the list, invoke the function, and display the result.

Here's one way to request a list from a user: ch = input ("Please enter a list of integers separated by commas:") But now ch is a list of strings that look like integers, so you need to create a new list which is a list of integer equivalents.

Examples (3 executions): Please enter a comma separated list of values: 1,2,1,3,3,3,6,1,1 3 Please enter a comma separated list of values: 1,5,2,2,2,7,3,3,3,3 4 Please enter a comma separated list of values: 3,1,7,1 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!