https://github.com/kingsley-ezenwaka/mean-var-std
This is a (mini) Python project, completed as part of the requirements for the Data Analysis with Python certification from freeCodeCamp.com.
https://github.com/kingsley-ezenwaka/mean-var-std
numpy python
Last synced: about 2 months ago
JSON representation
This is a (mini) Python project, completed as part of the requirements for the Data Analysis with Python certification from freeCodeCamp.com.
- Host: GitHub
- URL: https://github.com/kingsley-ezenwaka/mean-var-std
- Owner: kingsley-ezenwaka
- Created: 2025-02-18T16:08:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T16:25:52.000Z (over 1 year ago)
- Last Synced: 2025-02-23T00:26:41.935Z (over 1 year ago)
- Topics: numpy, python
- Language: Jupyter Notebook
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mean-Variance-Standard Deviation Calculator
This is a (mini) Python project, completed as part of the requirements for the **Data Analysis with Python** certification from [freeCodeCamp.com](https://www.freecodecamp.org/learn/data-analysis-with-python/).
## Project Instructions
Create a function named `calculate()` in mean_var_std.py that uses Numpy to output the mean, variance, standard deviation, max, min, and sum of the rows, columns, and elements in a 3 x 3 matrix.
The input of the function should be a list containing 9 digits. The function should convert the list into a 3 x 3 Numpy array, and then return a dictionary containing the mean, variance, standard deviation, max, min, and sum along both axes and for the flattened matrix.
The returned dictionary should follow this format:
```
{
'mean': [axis1, axis2, flattened],
'variance': [axis1, axis2, flattened],
'standard deviation': [axis1, axis2, flattened],
'max': [axis1, axis2, flattened],
'min': [axis1, axis2, flattened],
'sum': [axis1, axis2, flattened]
}
```
If a list containing less than 9 elements is passed into the function, it should raise a ValueError exception with the message: "List must contain nine numbers." The values in the returned dictionary should be lists and not Numpy arrays.
The instructions for building the project can be found at [freeCodeCamp](https://www.freecodecamp.org/learn/data-analysis-with-python/data-analysis-with-python-projects/mean-variance-standard-deviation-calculator).