From 573fc487f7e5dcdb7fa5463b203580fd0bcfabfa Mon Sep 17 00:00:00 2001 From: Shalini D Date: Mon, 2 Mar 2026 22:02:28 +0530 Subject: [PATCH 1/3] Add simple addition algorithm --- maths/maths/simple_addition.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 maths/maths/simple_addition.py diff --git a/maths/maths/simple_addition.py b/maths/maths/simple_addition.py new file mode 100644 index 000000000000..6aff329aedb0 --- /dev/null +++ b/maths/maths/simple_addition.py @@ -0,0 +1,17 @@ +""" +Simple addition function. +""" + + +def add_numbers(a: int, b: int) -> int: + """ + Returns the sum of two integers. + + >>> add_numbers(2, 3) + 5 + """ + return a + b + + +if __name__ == "__main__": + print(add_numbers(5, 7)) From 739512a5e2bbba7a9bf4f2d977bd8c3b42d11824 Mon Sep 17 00:00:00 2001 From: Shalini D Date: Mon, 2 Mar 2026 22:13:59 +0530 Subject: [PATCH 2/3] Delete maths/maths directory --- maths/maths/simple_addition.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 maths/maths/simple_addition.py diff --git a/maths/maths/simple_addition.py b/maths/maths/simple_addition.py deleted file mode 100644 index 6aff329aedb0..000000000000 --- a/maths/maths/simple_addition.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Simple addition function. -""" - - -def add_numbers(a: int, b: int) -> int: - """ - Returns the sum of two integers. - - >>> add_numbers(2, 3) - 5 - """ - return a + b - - -if __name__ == "__main__": - print(add_numbers(5, 7)) From 7208f166920ac96b65d1c74961f8fe81dee032f1 Mon Sep 17 00:00:00 2001 From: Shalini D Date: Mon, 2 Mar 2026 22:19:41 +0530 Subject: [PATCH 3/3] Add simple addition algorithm --- maths/simple_addition.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 maths/simple_addition.py diff --git a/maths/simple_addition.py b/maths/simple_addition.py new file mode 100644 index 000000000000..10cdf12c1643 --- /dev/null +++ b/maths/simple_addition.py @@ -0,0 +1,20 @@ +""" +Simple addition function. +https://en.wikipedia.org/wiki/Addition +""" + + +def add_numbers(a: int, b: int) -> int: + """ + Returns the sum of two integers. + + >>> add_numbers(2, 3) + 5 + >>> add_numbers(-1, 1) + 0 + """ + return a + b + + +if __name__ == "__main__": + print(add_numbers(5, 7))