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


Groups > comp.lang.python > #87832

fibonacci series what Iam is missing ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ganesh1pal@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'elif': 0.05; 'subject:missing': 0.07; 'python': 0.11; 'def': 0.12; 'expecting': 0.16; 'subject: ?': 0.16; 'example': 0.22; 'to:name :python-list@python.org': 0.22; 'print': 0.22; 'message- id:@mail.gmail.com': 0.30; 'subject:what': 0.31; 'received:google.com': 0.35; 'skip:[ 10': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JuFvNMdHDXhOD5F/75SIPZ2IJ9vPKOIYA/TdNFtd1qc=; b=q8pFt/stifDiEU+AhnkDwZaJziuR2EoO0661QATMkk4Ax/JJV7d2f1afeYCdMvgrgs lhaAgPQd/9ZP8igH8+U+enCOFOjznU4d2k7GzYoYUtYlQshBRd/UYO9su2EBY/BF9msH qQLHoElVDzTB9KSZn3EL5pjKBU9Gk5FKuD4xoHfU71flFxg6/esoNG30+p7lDnIaBCcU edk6bMTbFmTYhFI6NeqwsgPmz6C3jWixizFPgMDgtQCfu8UwSFyViLMb6eFSm6zLZ+dd eA4DsH+soYVx1+QnHSAl5vFldwwwqKTnj6QtOvZ4KxUMsPdWEUOnW2UyEh6HDNi0g+5e TWgA==
MIME-Version 1.0
X-Received by 10.152.87.206 with SMTP id ba14mr10806483lab.79.1427126510092; Mon, 23 Mar 2015 09:01:50 -0700 (PDT)
Date Mon, 23 Mar 2015 21:31:49 +0530
Subject fibonacci series what Iam is missing ?
From Ganesh Pal <ganesh1pal@gmail.com>
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.70.1427126512.10327.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1427126512 news.xs4all.nl 2911 [2001:888:2000:d::a6]:55715
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:87832

Show key headers only | View raw


Hello team ,


[root@localhost Python]# cat  fibonacci-Sequence-3.py

## Example 2: Using recursion
def fib(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)
print fib(5)

# python  fibonacci-Sequence-3.py
5

what Iam I missing in the program , I was expecting 0,1,1,2,3 ?

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


Thread

fibonacci series what Iam is missing ? Ganesh Pal <ganesh1pal@gmail.com> - 2015-03-23 21:31 +0530
  Re: fibonacci series what Iam is missing ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-24 11:11 +1100
    Re: fibonacci series what Iam is missing ? Ganesh Pal <ganesh1pal@gmail.com> - 2015-03-24 18:31 +0530

csiph-web