Checking 2 matrix can be Multiply or not - ERROR | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Checking 2 matrix can be Multiply or not - ERROR

Dear Friends Would you let me know why I receive ERROR ? CODE: https://code.sololearn.com/ceCJB7Ku0uj1/#py ERROR: https://www.dropbox.com/s/898qgzye6z9515r/Untitled.png?dl=0

19th Mar 2018, 10:19 PM
NIMA
NIMA - avatar
7 Answers
+ 1
all your lines are indented which the shouldnt be. Also its kind of unclear what the code is supposed to accompish. You are storing the matrixes as string and you have i variable implemented before the loop and you are checking if first letter in the string is equal to integer 0
19th Mar 2018, 10:31 PM
Markus Kaleton
Markus Kaleton - avatar
+ 1
I modified extra spaces in each line also added a missing = to line 9 but received new ERROR
19th Mar 2018, 10:36 PM
NIMA
NIMA - avatar
+ 1
can you copy paste the error?
19th Mar 2018, 10:37 PM
Markus Kaleton
Markus Kaleton - avatar
0
I modified again , removes () from a ([0]) to be a[0] new ERROR https://www.dropbox.com/s/liruxvwlrdgvx0c/Untitled.jpg?dl=0
19th Mar 2018, 10:43 PM
NIMA
NIMA - avatar
0
well as i mentioned before you are attepting to work with strings and not lists like you probably should. Also I can't understand what you are trying to accomplish since i cant understand the language in the comments
19th Mar 2018, 10:52 PM
Markus Kaleton
Markus Kaleton - avatar
0
I found the right code https://code.sololearn.com/cksr0eLD8HtW/#py One of the wrong codes was because I wanted to replace "len" with another way to find length of string
19th Mar 2018, 10:56 PM
NIMA
NIMA - avatar
0
The goal of this code is to find out whether 2 matrix can be multiply or not The mathematical rule is columns of matrix "a" should be equal to rows of matrix "b"
19th Mar 2018, 10:59 PM
NIMA
NIMA - avatar