-
-
Save codecademydev/24a46d59cd5cf47ca287f80d17798355 to your computer and use it in GitHub Desktop.
Codecademy export
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
# Write your max_num function here: | |
def max_num(num1,num2,num3): | |
if num1> num2 and num3: | |
return num1 | |
elif num2> num1 and num3: | |
return num2 | |
elif num3> num2 and num1: | |
return num3 | |
else: | |
return "It's a tie!" | |
# Uncomment these function calls to test your max_num function: | |
#print(max_num(-10, 0, 10)) | |
# should print 10 | |
#print(max_num(-10, 5, -30)) | |
# should print 5 | |
#print(max_num(-5, -10, -10)) | |
# should print -5 | |
#print(max_num(2, 3, 3)) | |
# should print "It's a tie!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment