Skip to content

Instantly share code, notes, and snippets.

@nnguyen168
Created May 24, 2020 08:07
Show Gist options
  • Save nnguyen168/b883469e36ea613e77cacab0df6e8348 to your computer and use it in GitHub Desktop.
Save nnguyen168/b883469e36ea613e77cacab0df6e8348 to your computer and use it in GitHub Desktop.
Function with procastination
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