How to solve this simle example? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to solve this simle example?

Hello, why does this solution to the example at the end of "Data Manipulation" of the "Data Science" course called "The Average of Rows" not work (for my code)? Given is this single line; I allowed to change int(x) to float(x) as this is needed. https://code.sololearn.com/c277KbTOHa3J/?ref=app What do I do wrong? Goal is to compute the average of each row of input. The input has the form: (first row (n, I guess)) two integer separated by a whitespace defining the dimensions of the following input and therfore not part of the average then seperated by a new line/enter on the console (I guess); (rest of the input (p, I guess)) followed by the mostly float values according to the first row's dimensions also separated by whitespaces. Either I am lost somehow, or the example is faulty; which is not the case most of the time. Thank you for your help. Edit: I removed the code from this post and inserted a link to the codebit; thank you Benjamin Jürgens

18th May 2021, 3:02 PM
Niederkofler Martin
3 Answers
+ 1
To post codes save them in code playground. Gives you syntax highlighting and also lets you run the code
18th May 2021, 4:26 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
By the way, Is there a way to post CodeSnipets nice and neat with syntax highligting etc.?
18th May 2021, 3:05 PM
Niederkofler Martin
0
Though, I recognized the console of the codebits behaves somehow different from the one in the lessons.
18th May 2021, 8:27 PM
Niederkofler Martin