How to find Median in maths class 10

 This is a code in which if have created how to find median of given data..

Actually when I was in class 10 their was a chapter in maths in which we have to find median of given data so that time I wrote this code to help me ..

print("This is a calculator which calculate median")
print("So first put value of L")
l=input()
print("Now enter the value of n")
n=input()
print("Put value of cf")
cf=input()
print("Enter value of f")
f=input()
print("put value of h")
h=input()
print("Your median is",int(l)+((int(n)/2)-(int(cf))/(int(f)))*int(h))

but their is a problem in this code it does not really find the median which is correct answer 
but if you will try to do this calculation in a normal calculator so you will get same value as 
this code will give... as I told you I am a beginner so as I am learning so I will try to upgrade 
this ... 

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