Skip to content

Instantly share code, notes, and snippets.

@st0le
Last active December 16, 2015 03:18
Show Gist options
  • Save st0le/5368454 to your computer and use it in GitHub Desktop.
Save st0le/5368454 to your computer and use it in GitHub Desktop.
import random
a,b,c = [random.randint(-100,100) for i in range(3)]
print a,b,c
#the actual solution
mx = max(a,max(b,c)) # max of a,b,c
mn = -max(-a,max(-b,-c)) # min of a,b,c, lol! :D
mid = a+b+c-mn-mx # middle term
print mn,mid,mx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment