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.



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

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

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?