Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Tic -tac- toe program using only lists, and indexing. No, if or else statements. must be in python and contain 9 moves for
Write a Tic -tac- toe program using only lists, and indexing. No, if or else statements. must be in python and contain 9 moves for 2 players
my code so far:
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 #1. Get input string nine moves, eg: 1 3 5 4 2 7 9 8 6 move_list = (input('Enter the move string:')).split(' ')
I'm trying to write this code only using lists and indexing very very simple version with no forloops, if, else, or, and.
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