0

Can anyone explain why this code is not applicable for all the cases in average of rows project of data science

import numpy as np n, p = [int(x) for x in input().split()] c=[] for i in range(0,n): a=np.array(input().split()).astype(np.float) b=a.mean() c+=[b,] print(np.array(c))

19th Jan 2021, 2:03 PM
Mitta Mukesh Kumar
Mitta Mukesh Kumar - avatar
1 Odpowiedź
+ 4
Based on the problem, You have to round the mean array to 2 decimal places. print(np.array(c).round(2))
19th Jan 2021, 2:34 PM
noteve
noteve - avatar