+ 1

python help

can somebody help me with my code? given an array I need a subprogram that tells me which is the largest plain, a plain is presented when two consecutive dots have the same height, so the largest plain will be the largest serie of consecutive dots with the same height

22nd Mar 2018, 10:56 PM
Camila Lancheros
Camila Lancheros - avatar
3 ответов
+ 4
Let's start somewhere: 1. create an array (list in python) of dots; 2. create a function that receives the list and returns the largest plain; a. maybe it should have a local variable that stores the current largest while you loop throught the values of the list; b. loop throught the values of the list; c. inside the loop should have an 'if' statement to check if the current values are the same height; d. and maybe a counter the save the size of the plains Hope this helps
22nd Mar 2018, 11:38 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
I don't know how to do it
22nd Mar 2018, 11:17 PM
Camila Lancheros
Camila Lancheros - avatar