program to find the median of 5 numbers using if

0 votes
asked Jan 9 by anonymous

1 Answer

0 votes
answered Jan 11 by VICKY
a = [int(x) for x in input().split()]
b=len(a)
print(b)
a.sort()
print(a)
b=len(a)

if(b%2==0):
    print((a[int(b/2)]+a[int(b/2+1)])/2)
else :
    print((a[int(b/2)]))
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...