Logo
Explore Help
Register Sign In
TheAlgorithms/Python
1
0
Fork 0
You've already forked Python
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
dbee5f072f68c57bce3443e5ed07fe496ba9d76d
Python/maths/add.py

20 lines
220 B
Python
Raw Normal View History

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>
2020-04-12 23:23:28 +05:30
"""
Just to check
"""
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>
2020-04-13 07:50:46 +02:00
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>
2020-04-12 23:23:28 +05:30
def add(a, b):
"""
>>> add(2, 2)
4
>>> add(2, -2)
0
"""
return a + b
if __name__ == "__main__":
a = 5
b = 6
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>
2020-04-13 07:50:46 +02:00
print(f"The sum of {a} + {b} is {add(a, b)}")
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 113ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API