Never mind this


Hello guys :smile:

I know that the above code is correct. It tells me so. I don't know why, though, some of the conditional statements have to be nested within the last "else" statement. Could you help me understand please? Thanks!


Wait I just figured out that the conditionals don't have to be nested within the "else" conditional!


Hi @betitochang96,

Does your code work as intended? From what I can see, the conditional on line 32 should be on line 25 instead. Else, if you input something like 6 for both row and column input you should get index out of bounds error.

I can't run it because you have pasted images. Thus, I ask you to try. Thanks! Or you can post your code here for me to test.


Hello! Thanks for responding. Can you post a photo of your code that worked for this part of battleship?


I didn't really try any code (haven't done the exercises). I mean to say that it seems that your code shouldn't be working the way it's supposed to.