You are viewing a single comment's thread. Return to all comments →
I got 2.94 if I run the code in VScode, but I got Runtime error when I submitted it. What was the error?
import numpy as np A = [1, 2, 3] stdA = np.std(A) mn = float('inf') N = 0 for i in np.arange(0, 4.01, 0.01): B = [1, 2, 3, i] stdB = np.std(B) if (abs(stdA - stdB) <= mn): mn = abs(stdA - stdB) N = i print(N)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Standard Deviation Puzzles #1
You are viewing a single comment's thread. Return to all comments →
I got 2.94 if I run the code in VScode, but I got Runtime error when I submitted it. What was the error?