Author stutzbach
Recipients belopolsky, draghuram, mark.dickinson, rhettinger, stutzbach
Date 2010-05-12.21:26:51
SpamBayes Score 0.0505401
Marked as misclassified No
Message-id <AANLkTikzMH9XM3-KXliVg6lnD22x9k4wr2oOLNYnX2pQ@mail.gmail.com>
In-reply-to <AANLkTim4hvDUg5ySjsPUvdaXoSJVygyQyno8COwHKg7z@mail.gmail.com>
Content
On Wed, May 12, 2010 at 3:34 PM, Alexander Belopolsky
<report@bugs.python.org> wrote:
> I wonder if one could write an elegant recursive version that would
> multiply first by last in partial_product.

That could be done with a three-parameter partial_product, where the
third parameter designates how many numbers to multiply.  Something
like this:

part_product(9, 17, 5) -> 9*11*13*15*17
  part_product(9, 17, 2) -> 9*17
  part_product(11, 15, 3) -> 11*13*15
History
Date User Action Args
2010-05-12 21:26:52stutzbachsetrecipients: + stutzbach, rhettinger, mark.dickinson, belopolsky, draghuram
2010-05-12 21:26:51stutzbachlinkissue8692 messages
2010-05-12 21:26:51stutzbachcreate