Skip to content
CampusEduX

Problem 1: Array Statistics Calculator

Easypython
Learn the Concept: NumPy

Problem Description

Write a Python program using NumPy that takes a list of numbers, converts it into a NumPy array, and prints the mean, maximum, minimum, and standard deviation.

Input

A list of numbers.

Output

Four lines showing mean, maximum, minimum, and standard deviation.

Constraints

  • The list will contain at least 2 numbers.

Example Input

text
[12, 45, 7, 22, 39]

Example Output

text
Mean: 25.0 Max: 45 Min: 7 Standard Deviation: 14.409719...

Concepts Covered

np.array(), np.mean(), np.max(), np.min(), np.std().

Related Problems

  • Problem 2: Add Bonus Marks Using Vectorization
    Easy · python
    Solve Problem
  • Problem 3: Reshape a 1D Array into a 2D Grid
    Easy · python
    Solve Problem
  • Problem 4: Compare Two Arrays Element-Wise
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...