Last active
April 20, 2017 13:57
-
-
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.
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
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