Skip to content

Instantly share code, notes, and snippets.

@abu-yusuf-dev
Last active April 20, 2017 13:57
Show Gist options
  • Save abu-yusuf-dev/620b0003c319b582e61b789d9e4f1228 to your computer and use it in GitHub Desktop.
Save abu-yusuf-dev/620b0003c319b582e61b789d9e4f1228 to your computer and use it in GitHub Desktop.
In This program at first user will take five values.Then the values will be sorted and give the median value.It will also print the larger values and smaller values compared to the median.So, This is the code where you will get the median values.
a = [int(x) for x in input().split()]
p,q,r,s,t=a
w=a.sort()
median=a[2]
l=a[3],a[4]
m=a[0],a[1]
print("Median is : %i" %median)
print("The larger values are: %i %i" %l)
print("The smaller values are: %i %i" %m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment