Answer:
# In the new version of python is available the functions mean() an variance()
# In the module of statistics
i = 0 #Var to input the elements
l = [] #Var to store the elements on a list
while(i>0):
print("In put a positive number to add in the list or negative to exit ")
i = input()
l.append(i)
print("The mean of the all elements is: " + mean(l) )
print("The variance of the all elements is: " + variance(i) )
Explanation:
At present, you can use in the <em>news python's verison</em> e.g. (python 3.7) the <em>statistics module</em> and use functions like <em>mean(), variance(), stdev()</em> and many others.
In the first step you create two variables, i to recieve the inputs of a loop and l to store all the elements recieved in the<em> i</em> variable. after that you pass as an argument the list that you stored before and get the <em>mean()</em> and <em>variance()</em> of the all elements in the list.
I hope it's help you.