mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
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 <johnlaw.po@gmail.com>
This commit is contained in:
19
maths/add.py
Normal file
19
maths/add.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
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)}")
|
||||
Reference in New Issue
Block a user