Untitled
unknown
python
a year ago
326 B
4
Indexable
import numpy as np def compute_stats(n): numbers = np.arange(n) mean = round(np.mean(numbers), 2) std_dev = round(np.std(numbers), 2) variance = round(np.var(numbers), 2) return mean, std_dev, variance n = int(input()) mean, std_dev, variance = compute_stats(n) print(mean) print(std_dev) print(variance)
Editor is loading...
Leave a Comment