#prog1 example_5#func 1 get inputdefgetinput():
nums=[]#define a viod list
iput=input("please input numbers (enter for exit):")#for the firstinput while iput !="":
nums.append(eval(iput))
iput=input("please input numbers (enter for exit):")#for the while-inputs#show the inputprint("the list is")for i in nums:print(i,end=" ")return nums
#getinput() #test
#func 2 calculate the average(mean) defmean(numlist):sum=0.0#float for the average calculation for i in numlist:sum+=i
count=len(numlist)
mean=sum/count
#print("\nthe mean is {}".format(mean))return mean
#func 3 calculate the variancedefvariance(vnlist,mean):
vsum=0.0for i in vnlist:
vsum+=pow(i-mean,2)
result=pow(vsum/(len(vnlist)-1),0.5)#result=pow(vsum/len(vnlist)-1,0.5)???-1#print("\nthe variance is {:.2}".format(result))return result
#func 3 calculate the mediandefmedian(mlist):sorted(mlist)#sort by size of numbers
oe=len(mlist)%2#odd-even check
lenth=len(mlist)if oe==0:#even
median=(mlist[lenth//2-1]+mlist[lenth//2])/2else:
median=mlist[len(mlist)//2]#print("the median is ",median)return median
defmain():
n=getinput()print("\nthe mean is {},the variance is {:.2},the median is {}".format(mean(n),variance (n,mean(n)),median(n)))#call the func
main()
get the changeable inputs#prog1 example_5#func 1 get inputdef getinput(): nums=[]#define a viod list iput=input("please input numbers (enter for exit):")#for the firstinput while i...