def zhongweishu(a):
new=sorted(a)
if len(a)%2==0:
s=(new[int(len(a)/2-1)]+new[int(len(a)/2)])/2
else:
s=new[int(len(a)-1)/2]
print(“这组数的中位数是:", s)
b=[2,5,4,8,9,7,4,6,4,3,5,5]
zhongweishu(b)
def zhongweishu(a):
new=sorted(a)
if len(a)%2==0:
s=(new[int(len(a)/2-1)]+new[int(len(a)/2)])/2
else:
s=new[int(len(a)-1)/2]
print(“这组数的中位数是:", s)
b=[2,5,4,8,9,7,4,6,4,3,5,5]
zhongweishu(b)