diff --git a/tictactoe.py b/tictactoe.py index 22019e0..90d4cb8 100644 --- a/tictactoe.py +++ b/tictactoe.py @@ -1,18205 +1 @@ -import sys -if sys.version_info[0] == 2: - input = raw_input # python 2 compatibility -print('Welcome to Tic Tac Toe!') -print('You are X.\n') -print(' | | ') -print(' | | ') -print(' | | ') -print('---+---+---') -print(' | | ') -print(' | | ') -print(' | | ') -print('---+---+---') -print(' | | ') -print(' | | ') -print(' | | \n') - -print('Enter the number of your move:') -print(' 7|8|9') -print(' -+-+-') -print(' 4|5|6') -print(' -+-+-') -print(' 1|2|3') -move = input() - -if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '7': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() -if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '7': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() -if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '7': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '5': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '7': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '7': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '7': - print('O moves on the bottom-right space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the top-right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the top-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the right space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-left space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '8': - print('O moves on the top-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '6': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '9': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the top-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '9': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() -if move == '9': - print('O moves on the top-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '4': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '2': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '5': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '3': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | X ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the top-center space.') - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '3': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '8': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '3': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | O ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | X ') - print(' | | \n') - - print('It\'s a tie!') - sys.exit() - if move == '6': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print('O moves on the left space.') - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print(' | | ') - print(' O | | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '8': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '8': - print('O moves on the bottom-right space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '1': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '2': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '4': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | O | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '5': - print('O moves on the bottom-left space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | | O ') - print(' | | \n') - - print('Enter the number of your move:') - print(' 7|8|9') - print(' -+-+-') - print(' 4|5|6') - print(' -+-+-') - print(' 1|2|3') - move = input() - - if move == '2': - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | X | O ') - print(' | | \n') - - print('You have won!') - sys.exit() - if move == '4': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' X | X | ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the bottom-center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' O | O | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() - if move == '6': - print('O moves on the center space.') - print(' | | ') - print(' O | X | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | O | X ') - print(' | | ') - print('---+---+---') - print(' | | ') - print(' | | O ') - print(' | | \n') - - print('The computer wins!') - sys.exit() +exec("import sys\nif sys.version_info[0] == 2:\n input = raw_input # python 2 compatibility\nprint('Welcome to Tic Tac Toe!')\nprint('You are X.\\n')\nprint(' | | ')\nprint(' | | ')\nprint(' | | ')\nprint('---+---+---')\nprint(' | | ')\nprint(' | | ')\nprint(' | | ')\nprint('---+---+---')\nprint(' | | ')\nprint(' | | ')\nprint(' | | \\n')\n\nprint('Enter the number of your move:')\nprint(' 7|8|9')\nprint(' -+-+-')\nprint(' 4|5|6')\nprint(' -+-+-')\nprint(' 1|2|3')\nmove = input()\n\nif move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '7':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\nif move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '7':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\nif move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '7':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '5':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '7':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '7':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '7':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the right space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '8':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '6':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '9':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the top-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '9':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\nif move == '9':\n print('O moves on the top-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '2':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '5':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '3':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | X ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the top-center space.')\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '3':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '8':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '3':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | O ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | X ')\n print(' | | \\n')\n \n print('It\\'s a tie!')\n sys.exit()\n if move == '6':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print('O moves on the left space.')\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print(' | | ')\n print(' O | | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '8':\n print('O moves on the bottom-right space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '1':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '2':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '4':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | O | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '5':\n print('O moves on the bottom-left space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | | O ')\n print(' | | \\n')\n \n print('Enter the number of your move:')\n print(' 7|8|9')\n print(' -+-+-')\n print(' 4|5|6')\n print(' -+-+-')\n print(' 1|2|3')\n move = input()\n\n if move == '2':\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | X | O ')\n print(' | | \\n')\n \n print('You have won!')\n sys.exit()\n if move == '4':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' X | X | ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the bottom-center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' O | O | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n if move == '6':\n print('O moves on the center space.')\n print(' | | ')\n print(' O | X | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | O | X ')\n print(' | | ')\n print('---+---+---')\n print(' | | ')\n print(' | | O ')\n print(' | | \\n')\n \n print('The computer wins!')\n sys.exit()\n") \ No newline at end of file