Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Last active January 10, 2019 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/24a46d59cd5cf47ca287f80d17798355 to your computer and use it in GitHub Desktop.
Save codecademydev/24a46d59cd5cf47ca287f80d17798355 to your computer and use it in GitHub Desktop.
Codecademy export
# 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