You're an intern at a rapidly growing tech start-up. They've recently developed a web application for data analysis, and a crucial part of it is calculating statistics. As they've been growing, the application's code base has become quite large, and it's time to start organizing things better. Your task for the week is to create a Python module called statistics_calculator that contains functions to calculate the mean, median, mode, and standard deviation of a list of numbers.
You should structure your code as follows: Create separate files for each of the statistics, with their respective calculation function. These files should be:
mean.py: Contains a function calculate_mean to calculate the mean.
median.py: Contains a function calculate_median to calculate the median.
mode.py: Contains a function calculate_mode to calculate the mode (in case there are several most frequent numbers the function should return the smallest one).
std_dev.py: Contains a function calculate_std_dev to calculate the standard deviation.
Each of these files should be within a directory named statistics_calculator. Finally, import all these functions in the statistics_calculator/__init__.py file so that other parts of the application can access these functions without additional imports.
The input and output are handled automatically by the main.py module.