You are on page 1of 1

Python PSF Docs PyPI Jobs Community

Donate  Search GO Socialize

About Downloads Documentation Community Success Stories News Events

# Python 3: Fibonacci series up to n Functions Defined


>_
>>> def fib(n): The core of extensible programming is defining functions.
>>> a, b = 0, 1
Python allows mandatory and optional arguments, keyword
>>> while a < n:
arguments, and even arbitrary argument lists. More about
>>> print(a, end=' ')
defining functions in Python 3
>>> a, b = b, a+b
>>> print()
>>> fib(1000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
1 2 3 4 5

Python is a programming language that lets you work quickly


and integrate systems more effectively. >>> Learn More

Contribute today to the 𝛑thon PSF Spring Fundraiser and show your love for Python!    Donate Now

 Get Started  Download  Docs  Jobs


Whether you're new to Python source code and installers Documentation for Python's Looking for work or have a Python
programming or an experienced are available for download for all standard library, along with tutorials related position that you're trying to
developer, it's easy to learn and use versions! and guides, are available online. hire for? Our relaunched
Python. community-run job board is the
Latest: Python 3.10.4 docs.python.org
place to go.
Start with our Beginner’s Guide
jobs.python.org

 Latest News >>> More  Upcoming Events >>> More


Announcing Python Software Foundation Fellow Members for Q1 2022-05-06 PyCon Kenya Conference 2022
2022-04-21
2022! 🎉
2022-05-21 Django Girls Malabo
2022-04-07 PSF Welcomes New Executive Director Deb Nicholson
2022-05-21 Django Girls Groningen
2022-04-06 The last Python 3.11 alpha (3.11.0a7) is available
2022-05-26 PyCon LT 2022
2022-03-24 Python 3.10.4 and 3.9.12 are now available out of schedule
2022-06-02 PyCon Italy 22
2022-03-22 Meta deepens its investment in the Python ecosystem

 Success Stories >>> More  Use Python for… >>> More


Web Development: Django , Pyramid , Bottle , Tornado , Flask , web2py
"Python is all about automating repetitive tasks, leaving
GUI Development: tkInter , PyGObject , PyQt , PySide , Kivy , wxPython
more time for your other SEO efforts."
Scientific and Numeric: SciPy , Pandas , IPython

Using Python scripts to analyse SEO and broken links on your site by Marnix de Munck Software Development: Buildbot , Trac , Roundup

System Administration: Ansible , Salt , OpenStack , xonsh

>>> Python Enhancement Proposals: The future of Python  RSS

>>> Python Software Foundation


The mission of the Python Software Foundation is to promote, protect, and advance the Python programming
language, and to support and facilitate the growth of a diverse and international community of Python
programmers. >>> Learn more

Become a Member Donate to the PSF

About Downloads Documentation Community Success Stories News

Applications All releases Docs Diversity Arts Python News

Quotes Source code Audio/Visual Talks Mailing Lists Business PSF Newsletter

Getting Started Windows Beginner's Guide IRC Education Community News

Help macOS Developer's Guide Forums Engineering PSF News

Python Brochure Other Platforms FAQ PSF Annual Impact Report Government PyCon News

License Non-English Docs Python Conferences Scientific

Events Alternative Implementations PEP Index Special Interest Groups Software Development Contributing

Python Events Python Books Python Logo Developer's Guide

User Group Events Python Essays Python Wiki Issue Tracker

Python Events Archive Merchandise python-dev list

User Group Events Archive Community Awards Core Mentorship

Submit an Event Code of Conduct Report a Security Issue

Get Involved

Shared Stories

Help & General Contact Diversity Initiatives Submit Website Bug Status

Copyright ©2001-2022.  Python Software Foundation  Legal Statements  Privacy Policy  Powered by Heroku

You might also like