We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defstdDev(arr):# Print your answers to 1 decimal place within this functions=sum(arr)l=len(arr)mean=s/la=[]foriinrange(l):ans=abs(arr[i]-mean)new_ans=ans*ansa.append(new_ans)new_sum=sum(a)standard=new_sum/lanswer=math.sqrt(standard)print(f"{answer:.1f}")
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Standard Deviation
You are viewing a single comment's thread. Return to all comments →