Q. Write a program to find the median, from a given list.
Answer =
lst = eval(input ("Enter the List :- ")) lst.sort() if len(lst) % 2 == 0 : print ("Median :- ", lst[ int (len(lst) / 2 )]) else : print ("Median :- ", lst[ int ((len(lst) + 1) / 2 )])
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )