From f6ee518ee1262d4680e468cc8f1ea8fae5e72d68 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 13 Apr 2020 07:50:46 +0200 Subject: [PATCH] Rename math/add.py to maths/add.py (#1857) * Rename math/add.py to maths/add.py * fixup! Format Python code with psf/black push * Fix sum to add * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: John Law --- DIRECTORY.md | 2 ++ {math => maths}/add.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) rename {math => maths}/add.py (76%) diff --git a/DIRECTORY.md b/DIRECTORY.md index 484c5e8fc..0f7363d7e 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -107,6 +107,7 @@ * [Doubly Linked List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/doubly_linked_list.py) * [From Sequence](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/from_sequence.py) * [Is Palindrome](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/is_palindrome.py) + * [Middle Element Of Linked List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/middle_element_of_linked_list.py) * [Print Reverse](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/print_reverse.py) * [Singly Linked List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py) * [Skip List](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/skip_list.py) @@ -271,6 +272,7 @@ * [Abs](https://github.com/TheAlgorithms/Python/blob/master/maths/abs.py) * [Abs Max](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_max.py) * [Abs Min](https://github.com/TheAlgorithms/Python/blob/master/maths/abs_min.py) + * [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py) * [Allocation Number](https://github.com/TheAlgorithms/Python/blob/master/maths/allocation_number.py) * [Area Under Curve](https://github.com/TheAlgorithms/Python/blob/master/maths/area_under_curve.py) * [Armstrong Numbers](https://github.com/TheAlgorithms/Python/blob/master/maths/armstrong_numbers.py) diff --git a/math/add.py b/maths/add.py similarity index 76% rename from math/add.py rename to maths/add.py index 3b8b40465..0bc7da969 100644 --- a/math/add.py +++ b/maths/add.py @@ -1,6 +1,8 @@ """ Just to check """ + + def add(a, b): """ >>> add(2, 2) @@ -14,4 +16,4 @@ def add(a, b): if __name__ == "__main__": a = 5 b = 6 - print(f"The sum of {a} + {b} is {sum(a, b)}") + print(f"The sum of {a} + {b} is {add(a, b)}")