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


Groups > comp.lang.python > #36611 > unrolled thread

Re: please i need explanation

Started by"K. Elo" <maillists@nic.fi>
First post2013-01-11 11:56 +0200
Last post2013-01-11 11:56 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: please i need explanation "K. Elo" <maillists@nic.fi> - 2013-01-11 11:56 +0200

#36611 — Re: please i need explanation

From"K. Elo" <maillists@nic.fi>
Date2013-01-11 11:56 +0200
SubjectRe: please i need explanation
Message-ID<mailman.390.1357898558.2939.python-list@python.org>
Hi!

Since there is no stated question, I need to guess:

n -= 1 (instead of "f -= 1")

should work.

Or maybe the question was a totally different one...

-Kimmo

11.01.2013 17:35, kwakukwatiah@gmail.com wrote:
> def factorial(n):
>      if n<2:
>               return 1
>      f = 1
>      while n>= 2:
>          f *= n
>          f -= 1
>      return f
>
>
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web