How to find median | Class 10 | Updated a program made with python.

Find median of group data .

As I made a median finder made with python , it was working but finding wrong answer but now I have updated that and this updated program is working properly and giving correct answer. So here is the code.

def median(l,n,cf,f,h):
"""This is a functions to find median of given group data
you have to put only the required values """
a=n/2
b=a-cf
c=b/f
d=c*h
x=d+l
return x
print("This is a calculator which calculate median")
print("So first put value of l")
l=int(input())
print("Now enter the value of n")
n=int(input())
print("Put value of cf")
cf=int(input())
print("Enter value of f")
f=int(input())
print("put value of h")
h=int(input())
print("Your median of given values is",median(l,n,cf,f,h))

Comments

Popular posts from this blog

Single Inheritance, multiple inheritance and multilevel inheritance in python.

Git Commands.

Using class objects, Instance variables, and class variables, class methods and static method in python