Skip to Content
Learn
Battleship!
Not Again!

Great! Now let’s handle the second type of incorrect guess: the player guesses a location that was already guessed. How will we know that a location was previously guessed?

print board[guess_row][guess_col]

The example above will print an 'X' if already guessed or an 'O' otherwise.

Instructions

1.

Add an elif to see if the guessed location already has an ‘X’ in it.

If it has, print "You guessed that one already."

Folder Icon

Take this course for free

Already have an account?