The code is not correct yet! You can find it here: https://repl.it/BTRd/1
This is the first WSQ about lists. Those two souces helped me a lot: first and second.
Here’s the code:
list1 = []
for i in range(0,7):
print("Give me value number", i+1, ", please.")
x = float( input())
list1.append(x)
print("The list looks like this:", list1)
sum = 0
for j in range(0,7):
sum = sum + list1[j]
print("The sum of all entries is", sum)
aver = sum/7
print("The average of all entries is", aver)
var = 0
for l in range(0,7):
var = var + (1/7)*(list1[l]-aver)**(2)
print("The variance is",var)
print("The standard deviation is", var**(.5))
WSQ10 – Lists by finntec is licensed under a Creative Commons Attribution 4.0 International License.