You are viewing a single comment's thread. Return to all comments →
PY
def plusMinus(arr): neq=0 pos=0 draw=0 dist=1/len(arr) for val in arr: if val<0: neq+=1 elif val>0: pos+=1 else: draw+=1 result=[round(pos*dist,6),round(neq*dist,6) , round(draw*dist,6)] return [print(i) for i in result]
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
PY