0

Test Cases 4 and 5 in the first Data Science's Code Project remain hidden. Any help?

Hello, I'm trying to solve Code Project "Average Rows" in Data Science course, but Test Case 4 and 5 remain hidden, so I cannot know what I'm doing wrong. Someone could help me?

30th Apr 2023, 5:27 PM
Alberto Sburlino
5 Respuestas
+ 6
Alberto Sburlino Not by guessing. Pls edit your question description and add: 1. A task description 2. A link to your code in Code Playground (use "+" button)
30th Apr 2023, 6:40 PM
Emerson Prado
Emerson Prado - avatar
30th Apr 2023, 6:48 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 1
Read carefully the "output format" spec: "...rounded to the second decimal". Side hint: arrays don't need to be initialized, just declared. So the line "means = list(range(n))" is overkill.
1st May 2023, 11:49 AM
Emerson Prado
Emerson Prado - avatar
0
Where is your code
30th Apr 2023, 11:34 PM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
0
THE CODE: https://code.sololearn.com/c60aFZg89N79/?ref=app THE QUESTION: In a matrix, or 2-d array X, the averages (or means) of the elements of rows is called row means. Task Given a 2D array, return the rowmeans. Input Format First line: two integers separated by spaces, the first indicates the rows of matrix X (n) and the second indicates the columns of X (p) Next n lines: values of the row in X Output Format An numpy 1d array of values rounded to the second decimal. 2 2 1.5 1 2 2.9 Sample Output [1.25 2.45]
1st May 2023, 8:59 AM
Alberto Sburlino