Skip to content

Instantly share code, notes, and snippets.

@stahnni
Created January 29, 2017 14:38
Show Gist options
  • Save stahnni/a299973a7143afd6b269c7da183cec79 to your computer and use it in GitHub Desktop.
Save stahnni/a299973a7143afd6b269c7da183cec79 to your computer and use it in GitHub Desktop.
function that takes as input three variables
#Implement a function that takes as input three variables, and returns the
#largest of the three. Do this without using the Python max() function!
def max_of_three(a,b,c):
if a > b:
print a
elif a > c:
print a
else:
print "There is no max!!!"
a = int(raw_input("Enter nmber: "))
b = int(raw_input("Enter nmber: "))
c = int(raw_input("Enter nmber: "))
max_of_three(a,b,c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment