Tic-Tac-Toe How To
Tic-Tac-Toe How To
Tic-Tac-Toe How To
valid!
On the next line, call the function player1play() to run the
previous if statement
Inside the else statement, create an if statement to see if
board[row][column] does not equal to __ (if that spot
does not equal to __, that means the spot contains either
o or x)
Under the if statement, print That spot is already taken!
Try again!
12.
argument
13.
Ask user for row number in raw input and set it equal to
variable named row
14.
Ask user for column number in raw input and set it equal to
variable named column
15.
Assign each row and column variable to an int version of
themselves.
To convert to type integer) row = int (row)
16.
Now to account for situation when user may enter a value
outside the 3 x 3 grid, create an if statement that checks to see if
row or column number entered is greater than 2 or less than 0
If row or column is greater than 2 or less than 0, print Not
valid!
On the next line, call the function player2play()to run the
previous if statement
Inside the else statement, create an if statement to see if
board[row][column] does not equal to __ (if that spot
does not equal to __, that means the spot contains either
o or x)
Under the if statement, print That spot is already taken!
Try again!
On the next line, run the function player2play() inside itself
Create an else statement with the same indentation as the
previous if statement that sets board[row][column] equal
17.
18.
19.
to o
Define a function called tie() that takes in no argument
Create a variable called count and set it equal to zero
Create a for loop that iterates through each row in the
variable board
20.
Create another for loop under the for loop that iterates
12.