-3
I need to create a code that will calculate the average, variance and standard deviation of the data entered by the user.
I thought of throwing this data into a list and from then on working them out. However, the user will type each number into a row. Capturing this data, each in a row, on a list is being my difficulty. I tried to work with the sys module and put a loop inside sys.stdin:
for n in sys.stdin:
for x in range(n):
lista.append(n)
But I’ve had some mistakes.
Could someone help me? I don’t necessarily want to work with the sys module, it was just an idea.
Thank you, Rodrigo. :)
– Isabela Pereira dos Santos