Created
February 26, 2015 08:22
-
-
Save ejmurray/5fd41055b5fd7721564e to your computer and use it in GitHub Desktop.
largest of two numbers
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
#!/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