Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Please!!! Write a function find_plateaus that receives a list of integers as parameters. Your function should find and return a list of plateaus, which
Python Please!!!
Write a function find_plateaus that receives a list of integers as parameters. Your function should find and return a list of plateaus, which are numbers that are equal to both of its neighbors. IMPORTANT NOTES: the first and last values can not be plateaus; the plateaus should be in the order they appear in the original list; the same value might be a plateau in multiple places in the original list; there might be no plateaus, in which case you should simply return an empty list. Example 1: If the function call is: find_plateaus ([1, 2, 2, 2, 1]) You should return [2], because: 2 == 2 and 2 == 2. Example 2: If the function call is: find_plateaus ([10, 2, 20, 4, 4, 4, 5, 8, 5, 5, 5, 5]) You should return [4, 5, 5], because: 4 == 4 and 4 == 4; 5 == 5 and 5 == 5; .5 == 5 and 5 == 5. 296528.1655254,qx3zqy7 LAB ACTIVITY 13.46.1: Find Plateaus (Loops - Medium) 0/11 File is marked as read only Current file: test_data.py 1 #This module creates the test_list to be used in main.py 2 #Reads input values from the user & places them into test_list 3 test_list [int(i) for i in input().split(", ")]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started