On Sunday, January 3, 2016 at 5:28:49 PM UTC+1, Ian wrote:
> On Sun, Jan 3, 2016 at 8:59 AM, wrote:
> > Thanks Chris!
> > Don't worry about the indent, will fix it
> > I've rewritten it to this-
> >
> > def get_algorithm_result( numlist ):
> >> largest = numlist[0]
> >> i = 1
> >> while ( i <
On Sunday, January 3, 2016 at 5:14:33 PM UTC+1, Chris Angelico wrote:
> On Mon, Jan 4, 2016 at 2:59 AM, wrote:
> > Thanks Chris!
> > Don't worry about the indent, will fix it
> > I've rewritten it to this-
> >
> > def get_algorithm_result( numlist ):
> >> largest = numlist[0]
> >> i = 1
> >>
Thanks Chris!
Don't worry about the indent, will fix it
I've rewritten it to this-
def get_algorithm_result( numlist ):
> largest = numlist[0]
> i = 1
> while ( i < len(numlist) ):
i = i + 1
>if ( largest < numlist[i]):
> largest = numlist[i]
> numlist[i] = numlist[-1]
Good day, please I'm writing the algorithm below in python but unittest keeps
giving error no matter how i rewrite it.
This is the algorithm:
Create a function get_algorithm_result to implement the algorithm below
Get a list of numbers L1, L2, L3LN as argument
Assume L1 is the largest, La