Skip to content

Instantly share code, notes, and snippets.

@KHerb
Last active July 14, 2016 14:32
Show Gist options
  • Select an option

  • Save KHerb/eb6888cb703936f473a94a71ed818151 to your computer and use it in GitHub Desktop.

Select an option

Save KHerb/eb6888cb703936f473a94a71ed818151 to your computer and use it in GitHub Desktop.
Prints mac of three entered numbers
print "Enter '3' numbers to return the maximum of all three!"
one = int(raw_input("Enter your 'first' number: "))
two = int(raw_input("Enter your 'second' number: "))
three = int(raw_input("Enter your 'third' number: "))
max_of_3 = []
max_of_3.append(one), max_of_3.append(two), max_of_3.append(three)
max_of_3.sort()
print "The max number is:" ,max_of_3[2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment