mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-05 02:40:16 +00:00
f6ee518ee1
* 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 <johnlaw.po@gmail.com>
20 lines
220 B
Python
20 lines
220 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 {add(a, b)}")
|