Question: this code is in python 1.3 Question 3: (10 points) As mentioned, a run is a sequence of consecutive repeated values. Implement a Python function

this code is in python

this code is in python 1.3 Question 3: (10 points) As mentioned,

a run is a sequence of consecutive repeated values. Implement a Python

1.3 Question 3: (10 points) As mentioned, a run is a sequence of consecutive repeated values. Implement a Python function called longest_run that takes a list of numbers and returns the length of the longest run. For example in the sequence: 2, 7, 4, 4, 2, 5, 2, 5, 10, 12, 5, 5, 5, 5, 6, 20, 1 the longest run has length 4. Then, in the main, your program should ask the user to input the list, then it should call longest run function, and print the result. You can obtain a list of numbers from the user as explained in Question1 Five examples of program runs: Please input a list of numbers separated by space: 1 1 2 3.0 3 3 3365 Please input a list of numbers separated by space: 66 711 1 14.5 Please input a list of numbers separated by space: 6 2.4 486 Please input a list of numbers separated by space: 3 Please input a list of numbers separated by space: Function call example longest_run(16, 6, 7, 1.0. 1.0. 1.0. 1, 4.5, 11)

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 Databases Questions!