The wsq10 is about to use a list to get multiple calculation. I am asked to do a program that recieves a set of ten numbers, and to get the total, the average, the standard desviation, yet in order to get the standard desviation I have to get the variance.
To get the list I used a for loop that asks ten times for a number; I used n as a counter to make the inputs float
To get the total I used another for loop to add the variable the number that is in the «e» position
To get te average I just divided the total over the number ofelements
In order to get the standard desviation I had to get the variance, so I get it with another for adding que square root of the «e» position of the lis minus the average; to get the standard desviation I get the square root of the divition of the variance over the number of elements
As always the code:
This program was like doing a cheesburger of a cheesburguer of acheesburger of a cheesburger… n of a n+1