Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #101214

Re: Consistent error

Newsgroups comp.lang.python
Date 2016-01-03 08:55 -0800
References <6f54629c-745f-4f75-a267-0f174cc1aea1@googlegroups.com> <mailman.205.1451832473.11925.python-list@python.org> <2a7c4d1e-b7ba-4fb7-845f-440026af3b59@googlegroups.com> <mailman.208.1451837655.11925.python-list@python.org>
Message-ID <50a52770-8ee2-47fd-b947-514937edebd9@googlegroups.com> (permalink)
Subject Re: Consistent error
From cc.fezeribe@gmail.com

Show all headers | View raw


On Sunday, January 3, 2016 at 5:14:33 PM UTC+1, Chris Angelico wrote:
> On Mon, Jan 4, 2016 at 2:59 AM,  <cc.fezeribe@gmail.com> 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 < 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!
> 
> Well, the algorithmic comments I mentioned would still help you to
> figure out what's going on :)
> 
> ChrisA



Thanks Chris!
You possess great knowledge I'd like to have...
... well I'm just a newbie... 

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Consistent error cc.fezeribe@gmail.com - 2016-01-03 06:35 -0800
  Re: Consistent error Chris Angelico <rosuav@gmail.com> - 2016-01-04 01:47 +1100
    Re: Consistent error cc.fezeribe@gmail.com - 2016-01-03 07:59 -0800
      Re: Consistent error Chris Angelico <rosuav@gmail.com> - 2016-01-04 03:14 +1100
        Re: Consistent error cc.fezeribe@gmail.com - 2016-01-03 08:55 -0800
          Re: Consistent error Alister <alister.ware@ntlworld.com> - 2016-01-03 18:22 +0000
      Re: Consistent error Ian Kelly <ian.g.kelly@gmail.com> - 2016-01-03 09:27 -0700
        Re: Consistent error cc.fezeribe@gmail.com - 2016-01-03 08:59 -0800
          Re: Consistent error iykeluvzu@gmail.com - 2016-01-15 06:15 -0800

csiph-web