Fibonacci Series
Fibonacci Series is a list of numbers in which one number on the series is the sum of the previous two numbers.
def fibonacci(end=None, start=0, inclusive=True, length=None):
...
Installation and usage
pip install py-fibonacci
from fibonacci import fibonacci
e.g. fibonacci(39) -> returns a list, you may assign it to a variable or print it.
This python package of fibonacci series, provides two use cases:
- With an 'end' number argument:: so it is possible to list the fibonacci series up to that number and start (default: 0) number argument is optional. An optional boolean inclusive (default: True) argument makes the end number inclusive or exclusive.
examples:
fibonacci(39)
-> only end number is given. there are several fibonacci numbers upto 39 starting at 0.
fibonacci(39, 3)
-> end and start numbers are given. there are several fibonacci numbers upto 39 starting at 3.
fibonacci(39, 3, False)
-> end, start numbers and inclusive=False are given. there are several fibonacci numbers upto 39 (exclusive) starting at 3.
- With a 'length' number argument:: so it is possible to set the length of the series and start (default: 0) number argument is optional.
examples:
fibonacci(length=20)
-> only length of the series is given. there are 20 fibonacci numbers starting at 0.
fibonacci(start=5, length=20)
-> start number and length of the series is given. there are 20 fibonacci numbers starting at 5.
Metadata
Release files for py-fibonacci 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py-fibonacci-0.5.2.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_fibonacci-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / py-fibonacci-0.5.2.tar.gz
| Download URL | py-fibonacci-0.5.2.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faba28da27092bc3e83c78fd73f0b0c5e3c548b9d7690b6194774441e03b84e7
|
|
BLAKE2b-256 checksum How to use checksums |
fc259ff754a72c15154120d739d6231bb7c6c53b4b2b77a0eb391cb5abee0597
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|
Release files / py_fibonacci-0.5.2-py3-none-any.whl
| Download URL | py_fibonacci-0.5.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a31b97379f444384f2349e34a8cfd350d3219e45ac794cb0f9541db4e5476250
|
|
BLAKE2b-256 checksum How to use checksums |
1093b01c135d8aef1ed67cad94c08081385295c00a74d8243fcbcd5b8efe138f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|