added add algorithm (#1856)

* added add algorithm

* Update and rename check/add.py to math/add.py

Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Shrutika Bansal 2020-04-12 23:23:28 +05:30 committed by GitHub
parent 8bf380ce7d
commit 3735e74296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

17
math/add.py Normal file
View File

@ -0,0 +1,17 @@
"""
Just to check
"""
def add(a, b):
"""
>>> add(2, 2)
4
>>> add(2, -2)
0
"""
return a + b
if __name__ == "__main__":
a = 5
b = 6
print(f"The sum of {a} + {b} is {sum(a, b)}")