Great! Of course, the player isn’t going to guess right all the time, so we also need to handle the case where the guess is wrong.
The example above prints out
"O", the element in the 3rd row and 4th column.
else under the
if we wrote in the previous step.
"You missed my battleship!"
Set the list element at
As the last line in your
else statement, call
print_board(board) again so you can see the
"X".Make sure to enter a col and row that is on the board!