Created
November 24, 2012 06:51
-
-
Save programmer-ke/4138705 to your computer and use it in GitHub Desktop.
basic math functions
This file contains hidden or 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 add(a, b): | |
"""Takes in two numbers and returns their sum""" | |
return a + b | |
def sub(a, b): | |
"""Takes in two numbers and returns their difference""" | |
return a - b | |
def multiply(a, b): | |
"""Takes in two numbers and returns their product""" | |
return a * b | |
def divide(a, b): | |
"""Takes in two numbers and divides the first by the second""" | |
return a/b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment