Created
January 29, 2017 14:38
-
-
Save stahnni/a299973a7143afd6b269c7da183cec79 to your computer and use it in GitHub Desktop.
function that takes as input three variables
This file contains 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
#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