Question: 1.2 Question 2: (5 points) Implement a Python function called two_length_run that takes a list of numbers as input parameter and returns True if the

 1.2 Question 2: (5 points) Implement a Python function called two_length_run

1.2 Question 2: (5 points) Implement a Python function called two_length_run that takes a list of numbers as input parameter and returns True if the given list has is at least one run (of length at least two), and False otherwise. Make sure the function is efficient (i.e. it stops as soon as the answer is known). Then, in the main, your program should ask the user to input the list, then it should call two_lengthrun function, and print the result. You can obtain a list of numbers from the user as explained in Question1 Four examples of program runs: Please input a list of numbers separated by space: 143 3 4 True Please input a list of numbers separated by space: 1 2 3 True 3 3 4.565 Please input a list of numbers separated by space: 1.0 2 3.7432 False Please input a list of numbers separated by space: 7.7 False Function call example: two_length run( 12.7, 1.0, 1.0, 0.5, 3.0, 1.01 True

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!