Question
My board won't print right, can someone help me get my board to print write. This is in python I tried to put an image
My board won't print right, can someone help me get my board to print write. This is in python I tried to put an image but it wouldn't let me this is my code for move one, it's repeated for 9 moves. The questions just ask's to make a tic tac toe game. But are knowledge so far is fairly simple with no use of if, else, or elif, or even def statements. All we are required to do is make a game using list, index, and formatting.
#Tic-tac-toe game run watch
board_list = [1, 2, 3, 4, 5, 6, 7, 8, 9] row1 = [1, 2, 3] row2 = [4, 5, 6] row3 = [7, 8, 9] board_list = [row1, row2, row3]
#print board divider = 10*'-' print(board_list [0][0],'|',board_list [0][1],'|',board_list [0][2]) print(divider) print(board_list [1][0],'|',board_list [1][1],'|',board_list [1][2]) print(divider) print(board_list [2][0],'|',board_list [2][1],'|',board_list [2][2]) #1. Get input string nine moves, eg: 1 3 5 4 2 7 9 8 6 move_list = (input('Enter the move string:')).split(' ')
old code was for a 2d list, needs to be a 1d list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started