Log in from a computer to take this course

You'll need to log in from a computer to start Learn Python 2. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

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?