# numpy-ex1 **Repository Path**: arsalabangash/numpy-ex1 ## Basic Information - **Project Name**: numpy-ex1 - **Description**: First numpy exercise - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 117 - **Created**: 2025-03-12 - **Last Updated**: 2025-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Exercise 2: Basic Statistics with NumPy ## English 1. **Objective:** Learn to read multiple CSV files and use NumPy to calculate the mean, median, mode, standard deviation, and variance of math scores. 2. **Tasks:** * Read all three CSV files (class1.csv, class2.csv, class3.csv) using Python's built-in `csv` module. * Extract the math scores from the data of each file. * Combine the math scores from all three files into a single NumPy array. * Calculate the mean (average) of all math scores using NumPy. * Calculate the median (middle value) of all math scores using NumPy. * Calculate the mode (most frequent value) of all math scores using NumPy. * Calculate the standard deviation of all math scores using NumPy. * Calculate the variance of all math scores using NumPy. * Print all five statistics with appropriate labels. 3. **Requirements:** * Use NumPy to perform the statistical calculations. * You may use the `csv` module for reading the files. * Include comments explaining your code. ## Chinese 1. **目标**:学习如何读取多个CSV文件,并使用NumPy计算数学分数的平均值、中位数、众数、标准差和方差。 2. **任务**: * 使用Python内置的 `csv` 模块读取所有三个CSV文件(class1.csv、class2.csv、class3.csv)。 * 从每个文件的数据中提取数学分数。 * 将来自所有三个文件的数学分数合并到一个NumPy数组中。 * 使用NumPy计算所有数学分数的平均值。 * 使用NumPy计算所有数学分数的中位数。 * 使用NumPy计算所有数学分数的众数。 * 使用NumPy计算所有数学分数的标准差。 * 使用NumPy计算所有数学分数的方差。 * 使用适当的标签打印所有五个统计数据。 3. **要求**: * 使用NumPy执行统计计算。 * 可以使用 `csv` 模块读取文件。 * 包含解释代码的注释。