mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
3735e74296
* added add algorithm * Update and rename check/add.py to math/add.py Co-authored-by: Christian Clauss <cclauss@me.com>
18 lines
218 B
Python
18 lines
218 B
Python
"""
|
|
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)}")
|