> I confused things by my mistake in the specifications.
>
> The criterion for exiting the outer loop is that
>
> mpylist[0][1] * mult[0] + mpylist[1][1] * mult[1] + mpylist[2][1] *
> mult[2]
> + . . .
>
> be > zlim.
Can you try rewriting the spec correctly, because I'm still not
sure I understan
Message: 2
Date: Wed, 9 Aug 2006 16:04:27 +1200
From: "John Fouhy" <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Exercise in writing a python function.
To: "Tutor mailing list"
Hi Kermit,
Your basic data structure is a list (actually, several related lists),
which
From: Alan Gauld
Date: 08/09/06 03:30:28
To: Kermit Rose; tutor@python.org
Subject: Re: [Tutor] Exercise in writing a python function.
> The current specifications for the function are:
>
> def incr(mult,z,zlim,mpylist):
> # mult is a vector of exponents for the multiplier
> The current specifications for the function are:
>
> def incr(mult,z,zlim,mpylist):
> # mult is a vector of exponents for the multipliers in mpylist.
> # z is a positive odd integer.
> # zlim is the upper bound critical value for the sum of (
> mpylist[k][0] *
> mpylist[k][1] )
Just to clari
On 09/08/06, Kermit Rose <[EMAIL PROTECTED]> wrote:
> Hello John.
>
> Thanks for replying.
>
> In my previous version, I used z as the critical value,.
>
> Since I created zlim, a function of z, to be passed in as a parameter, I no
> longer need z
>
> in the parameter list.
>
> In another part of
On 09/08/06, Kermit Rose <[EMAIL PROTECTED]> wrote:
> def incr(mult,z,zlim,mpylist):
> # mult is a vector of exponents for the multipliers in mpylist.
> # z is a positive odd integer.
> # zlim is the upper bound critical value for the sum of ( mpylist[k][0] *
> mpylist[k][1] )
> # where kth mult
Hello all.
I feel more familar with Python now, and when I recently went back to
reading
the tutorial, I could actually read it without being overwhelmed by too
much new detail.
I've been staring at the specs for a python function for a while.
I wrote one version of it and it worked.