0

I need help with figuring how to code in python

I am new to the whole coding community and my skills are not good. I understand what needs to be done, but my problem is I don't know how to write it. Can someone help me figure out how to write this code? Your software company has been contracted to write a prototype program to perform simple statistical evaluations of integer data. Your portion of this program requires that you implement StatPackage. The functional specification for your program is: Your StatPackage will accept up to 500 values as input. Numerical values will be printed with two significant digits to the right of the decimal point. Mean is the mean value for the items in the StatPackage, mean is essentially the same as the average. Your program will output: Mean: 72.11 where 72.11 is replaced by the actual value calculated by the program. Median is middle value if the number of items is odd or the average of the middle two values if the number of items is even. Your program will output: Median: 75.11 where 75.11 is replaced by the actual value calculated by the program. Variance is determined by the formula: the sum of the square of the values / count - square of the sum of the values / square of the count Your program will output: Variance: 3.86 where 3.86 is replaced by the actual value calculated by the program. StdDev is the square root of the variance Your program will output: Standard Deviation: 5.10 where 5.10 is replaced by the actual value calculated by the program.

5th Nov 2016, 4:05 AM
Diego Nuila
Diego Nuila - avatar
2 ответов
+ 6
You said it yourself, your skills aren't good. Right now focus on practising and studying and getting yourself some experience in programming. Then you can go ahead and start doing projects.
6th Nov 2016, 3:33 PM
Alireza M
Alireza M - avatar
+ 2
You may know what to do. But your task is to write a program to do it instead. Start with the very first step you can think of, and and build on that. For example 1 Write a list of 5 integers 2 Calculate the mean of that list and print it out 3 Create a random number n between 1 - 5 4 reate a for loop that runs n times that prints something 5 Push the print out into your list 6 Create a random integer instead of the print statement 7 Change n to 1 - 500 8 Format your output to two decimals 9 Calculate the median, etc 10 OPTIMIZE - see whether you can make your code simpler Check multiple times after each step, if your program performes as expected, then proceed. Good luck!
27th Apr 2018, 12:27 PM
Johannes
Johannes - avatar