Skip to content

Instantly share code, notes, and snippets.

@ejmurray
Created February 26, 2015 08:22
Show Gist options
  • Save ejmurray/5fd41055b5fd7721564e to your computer and use it in GitHub Desktop.
Save ejmurray/5fd41055b5fd7721564e to your computer and use it in GitHub Desktop.
largest of two numbers
#!/usr/bin/python
# encoding: utf-8
"""
"""
__author__ = 'Ernest'
def maximum(num1, num2):
"""
:param num1: any number
:param num2: any number
:return: the maximum number
"""
if num1 > num2:
result = num1
else:
result = num2
return result
def main():
"""
:return: returns the largest number of i and j
"""
i = 5
j = 2
k = max(i, j) # calls the max function
print "The larger number of", i, "and", j, "is", k
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment