Created
May 24, 2020 08:07
-
-
Save nnguyen168/b883469e36ea613e77cacab0df6e8348 to your computer and use it in GitHub Desktop.
Function with procastination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sum_of_two_numbers(a, b): | |
""" | |
The function to calculates the sum of two numbers | |
Parameters: | |
a: integer -> the first number | |
b: integer -> the second number | |
Return: | |
sum: integer -> the result which is the sum of a and b | |
Example usage: | |
sum_of_two_numbers(2,3) -> 5 | |
sum_of_two_numbers(4,0) -> 4 | |
sum_of_two_numbers(-1,1) -> 0 | |
sum_of_two_numbers(-5, 2) -> -3 | |
sum_of_two_numbers(100000000000000000000, 1) -> 100000000000000000001 | |
""" | |
sum = a + b | |
return sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment