Commit Graph

17 Commits

Author SHA1 Message Date
Christian Clauss
19bff003aa
Adopt Python >= 3.8 assignment expressions using auto-walrus (#7737)
* Adopt Python >= 3.8 assignment expressions using auto-walrus

* updating DIRECTORY.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-28 15:54:54 +02:00
Maarten
868c2fa0a8
Rewrite fibonacci.py (#5665) (#5677)
* Removed doctest call

* Removed 0 and 1 append to `fib_array`

* Moved fibonacci sequence logic into `calculate`

* Refactored `get` to generate missing numbers

* Renamed `fib_array` to `sequence`

* Renamed `number` to `index`

* Refactored `get` to only return sequence to `index`

* Moved main block into function

* Added documentation to `get`

* Added missing type hints

* Fixed doctest error in `get` docstring

* Moved calculate logic into get

* Reformatted with black

* Fixed wrong generation range
2021-10-31 22:19:44 +08:00
Christian Clauss
9316e7c014
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-16 10:09:19 +02:00
matkosoric
7f04e5cd34
contribution guidelines checks (#1787)
* spelling corrections

* review

* improved documentation, removed redundant variables, added testing

* added type hint

* camel case to snake case

* spelling fix

* review

* python --> Python # it is a brand name, not a snake

* explicit cast to int

* spaces in int list

* "!= None" to "is not None"

* Update comb_sort.py

* various spelling corrections in documentation & several variables naming conventions fix

* + char in file name

* import dependency - bug fix

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-03-04 13:40:28 +01:00
Ankur Chattopadhyay
7592cba417 psf/black code formatting (#1421)
* added sol3.py for problem_20

* added sol4.py for problem_06

* ran `black .` on `\Python`
2019-10-22 19:13:48 +02:00
Jigyasa G
ea47ae2932 Adding missing Doctests (#1330)
* Adding doctests in abbreviation

* Adding doctests in fibonacci.py
2019-10-10 00:20:19 +05:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Christian Clauss
47a9ea2b0b
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python

* sort() --> sorted()
2019-08-19 15:37:49 +02:00
cclauss
e31c780d94 Modernize Python 2 code to get ready for Python 3 2017-11-25 12:41:55 +01:00
cclauss
4e06949072 Modernize Python 2 code to get ready for Python 3 2017-11-25 10:23:50 +01:00
KyleScharnhorst
014786e340 Fix: typo in multiple files. 2017-10-07 06:47:50 -07:00
Mehdi ALAOUI
ce8b025320 Adding spaces between operators 2017-04-12 14:45:56 +01:00
Mehdi ALAOUI
9a756d1940 Fixing some terms number issue, and improving result for first terms (0 and 1) 2017-04-11 23:10:52 +01:00
Akshay Sharma
2dcb85d581 PEP style 2016-09-26 16:09:59 +05:30
Akshay Sharma
a3c5167fad pep style and fixed exception on input other and integer type 2016-09-26 16:08:40 +05:30
Akshay Sharma
7c90322815 dp intro ro fr fibonacci.py 2016-09-26 15:58:43 +05:30
Akshay Sharma
edf9dd2156 dynamic_programming, fibonacci sequence. 2016-09-26 15:56:23 +05:30