Question: not sure how to do this one please help 22012020 Labu/Test Revo page 9 of 101 Not complete Marked out of 1.00 Define a function

not sure how to do this one
please help
22012020 Labu/Test Revo page 9 of 101 Not complete Marked out of 1.00 Define a function called day_trader() which takes a list of integers as a parameter which represent changing stock prices over the course of a day. The function should detect the longest consecutive sequence of increasing values in the list. For example, consider the list below which shows 10 prices changing: [123, 120, 118, 119, 121, 126, 127, 130, 129, 132] The longest consecutive sequence of increasing values in this list begins with the value 118. Starting with the value 118, the next 5 values are in strictly increasing order (119, 121, 126, 127, 130), This is the longest such sequence in the list, and the length of this sequence is 6 (from 118 to 130). The day trader() function should retum a tuple where the first value in the tuple is the index position in the list of the value at the start of the sequence (e.g. 2, which is the index second value in the tuple is the length of the increasing sequence (eg. 6). If there are two or more increasing sequences of the same length in the list, then the function must return the first one when reporting the start of the sequence. For example: Test Result (3, 5) print(day_trader([59, 60, 55, 23, 42, 44, 48, 50, 43, 45, 43, 44, 47, 51, 52])) print(day_trader( [76, 182, 69, 35, 184, 59, 113, 93, 97, 99])) (7,3) Answer: (penalty regime 0, 0,5, 10, 15, 20, 25, 30, 35, 40, 45, 50 %) Precheck Check - Lab06Sorting Jump to... Jump to. LabosClasses Intipederne audland.remoodle.node m pt.ple Pallat=25865cmid=16&page=2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
