Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.068 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; '(instead': 0.09; 'explanation': 0.09; 'friday,': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'wrote:': 0.17; 'message-----': 0.17; 'subject:need': 0.17; 'cc:2**0': 0.23; 'work.': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'question': 0.27; 'subject:please': 0.27; 'maybe': 0.29; 'code': 0.31; 'skip:- 10': 0.32; '11,': 0.33; 'received:google.com': 0.34; 'there': 0.35; 'subject:': 0.36; 'received:74.125': 0.36; 'totally': 0.36; 'email addr:python.org': 0.36; 'should': 0.36; 'why': 0.37; 'sent:': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'from:no real name:2**0': 0.60; 'email name:python-list': 0.62; 'different': 0.63; 'email addr:gmail.com': 0.63; 'below.': 0.68; 'stated': 0.69; 'received:199': 0.71; '2013': 0.84; 'don\xe2\x80\x99t': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:from:to:cc:references:in-reply-to:subject :date:mime-version:content-type:content-transfer-encoding:x-priority :x-msmail-priority:importance:x-mailer:x-mimeole; bh=T7eojKUhFBlTJCgP5qPABIScXgKGWerKWdKhh/GS2ig=; b=iJDtrWYDS2kXLR/a+OlSpKaFki49ZlDEbwaQx8vYkXWo+b8qUaeqoumnDSDIpbEEb7 9i/XhxafSFyvngy/tM8uqM9pZ7fpM+9/L3AfUzrZ8bDV8qY36R+qKj1WS8Gnpajuu/SQ 7V8WI+VRySaN4eSzlXLnigXJFCFEWo73DQZ0SLfg94ra5+WrvJ8awO5M93VD3ZCm+mhC 4dGcFotWo72WZC6SUdyMN0WD2R1gppmgj7vPPgJqkWl24juQIpo0rGhZstGHZaLOorRN xty+1r26EtrC3Se/5hP3z5lUXY0swiGjhF87sAWIAKvYtkPReWmVsAoCMOd/7BmwHv+v 7Unw== X-Received: by 10.14.173.69 with SMTP id u45mr200955507eel.21.1357900424786; Fri, 11 Jan 2013 02:33:44 -0800 (PST) From: kwakukwatiah@gmail.com To: "K. Elo" References: <2FB5A66FD91D456BBDFCC0AE25760392@favour> <50EFE1C3.5000303@nic.fi> In-Reply-To: <50EFE1C3.5000303@nic.fi> Subject: Re: please i need explanation Date: Fri, 11 Jan 2013 10:33:36 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3508.1109 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357900426 news.xs4all.nl 6840 [2001:888:2000:d::a6]:55328 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36614 -----Original Message----- From: K. Elo Sent: Friday, January 11, 2013 3:56 AM To: python-list@python.org Subject: Re: please i need explanation 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 > > > please it works.but don’t get why the return 1 and the code below.