Consistent error

cc.fezeribe at gmail.com cc.fezeribe at gmail.com
Sun Jan 3 10:59:48 EST 2016


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] 
>      numlist = [1,2,3,4,5] 
       return largest
> def prime_number(x): 
>  return len([n for n in range(1, x + 1) if x % n == 0]) <= 2

But it still gives the test_maximum_number_one error.
Please if you have any ideas what else I should change or add, let me know. Thanks! 



More information about the Python-list mailing list