Average of Rows end of module project from Data Science | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Average of Rows end of module project from Data Science

Please Iā€™m struggling with the input format. I have done it on my pc and it works. Iā€™ve read the instructions over and over Iā€™m pretty sure Iā€™m not doing something right. Please can anyone help me? Thank you.

5th Jan 2021, 8:14 PM
Erik Gordon-Quaicoe
Erik Gordon-Quaicoe - avatar
4 Respostas
0
youā€™ll have to be more specific if you want a useful answer. why donā€™t you start by sharing your work or what you think you might be doing wrong?
6th Jan 2021, 3:20 AM
fch0
0
fch0 when i input the rows as stated in the instruction example 1.5 1 i get invalid syntax
6th Jan 2021, 8:02 AM
Erik Gordon-Quaicoe
Erik Gordon-Quaicoe - avatar
0
invalid syntax is a common error raised in python when thereā€™s something wrong with your syntax like a missing colon for example, i canā€™t tell you much more than that without knowing whatā€™s going on, could you paste here the line of your code that is raising it?
6th Jan 2021, 12:25 PM
fch0
0
Data Science - the perfect solution for average of rows n, p = [int(x) for x in input().split()] import numpy as np rm = [] for i in range(n): for a in input().split(): rm.append(float(a)) a = np.array(rm).reshape((n,p)) c = np.mean(a,axis=1) p = np.around(c,2) print(p)
1st Mar 2021, 2:37 AM
黄굷ē™»
黄굷ē™» - avatar