Well in this Wsq what we have to do is this:
Create a program that asks the user for 10 numbers (floating point). Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers.
What?? standard deviation?? What the hell is that?? well, here’s the answer, this page was very helpful because it explains how the standard deviation works, and it gives you examples on how to do it, so you can apply those examples for the program.
Well knowing that, now we can focus in the point of this wsq, which is put the 10 numbers given by the user, in lists, and return the sum, average and standard deviation of the 10 numbers. If you want to know a little bit more about lists you can consult this link, it has many many examples of lists, it’s a very long document, but you can read it if you’re interested: https://docs.python.org/3/tutorial/datastructures.html
But thanks to Danny and his link about lists, was easier to do this program, so thanks Danny.
Well here’s the program and the screenshots of the terminal:
You can notice that I used the module statistics which made this wsq so much easier, this module allow us to use statistics functions.
Here’s the code on GitHub
#Wsq10 by andreatrejod is licensed under a Creative Commons Attribution 4.0 International License.