Battleship "Not Again!" 13/19


<Battleship Not Again!>
Don’t understand why round brackets are needed for the Elife statement

<Below this line, add a link to the EXACT exercise that you are stuck at.>

Hi Guys,

For this exercise, i believed i had the correct code originally, but it didn’t work since i did not put round brackets

What I did:

elif board[guess_row][guess_col] == ‘X’:
print “You guessed that one already.”

What the correct code was:

elif (board[guess_row][guess_col] == ‘X’):
print “You guessed that one already.”


Replace this line with your code.

<do not remove the three backticks above>


It should work either way. When the parentheses surround the entire expression, they have no effect on its evaluation.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.