Feb-20-2019, 04:04 PM
(This post was last modified: Feb-20-2019, 04:17 PM by Qmohankumar0017.)
Thank you!
Sorry didn't know that.
I'll make sure to add python tag in the future
[[1,2], [3,4]] this when flipped vertically works without any problem
But when flipped horizontally it shows side effect.(These are in the website in which I have to submit my assignment. The website provides a python 3 terminal to paste the codes and run the script)
So I tried running the same script in my laptop. Both the cases worked without any errors and I get the correct output too!
Sorry didn't know that.
I'll make sure to add python tag in the future
(Feb-20-2019, 04:03 PM)ichabod801 Wrote: Are the input matrices guaranteed to be square? The problem doesn't say they are. In theI got the matrix they are using for tests.d == 'h'
section you are using len(m) for both the iteration over rows and the iteration over columns.
You should generally iterate over the list, not the indexes of the list, as shown here. Is there some reason you are not using list.reverse() or list[::-1] to reverse the list or sub-lists?
[[1,2], [3,4]] this when flipped vertically works without any problem
But when flipped horizontally it shows side effect.(These are in the website in which I have to submit my assignment. The website provides a python 3 terminal to paste the codes and run the script)
So I tried running the same script in my laptop. Both the cases worked without any errors and I get the correct output too!