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) )
Step-by-step explanation:
At present, you can use in the news python's verison e.g. (python 3.7) the statistics module and use functions like mean(), variance(), stdev() 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 i variable. after that you pass as an argument the list that you stored before and get the mean() and variance() of the all elements in the list.
I hope it's help you.