Skip to content

Instantly share code, notes, and snippets.

@programmer-ke
Created November 24, 2012 06:51
Show Gist options
  • Save programmer-ke/4138705 to your computer and use it in GitHub Desktop.
Save programmer-ke/4138705 to your computer and use it in GitHub Desktop.
basic math functions
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