Python homework. Someone familiar with that programming language. – Check that s

Posted: November 23rd, 2022

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

Python homework. Someone familiar with that programming language.
– Check that space is a number, and is valid (1-9)
– Check that space has not already been taken
– Fix the turn taking
– Check for all winners
– Check for a tie (and show that)
– Add in a “would you like to play again” loop.
I already did the first one.
Let me send you my code.
board = [‘1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′]
def printboard():
print(board[0],’|’,board[1], ‘|’,board[2])
print(‘–+—+—‘)
print(board[3],’|’,board[4], ‘|’,board[5])
print(‘–+—+—‘)
print(board[6],’|’,board[7], ‘|’,board[8])
print()
def checkwinner():
# Returns TRUE if there’s a winner, FALSE otherwise
if board[0]==board[1]==board[2]:
print(“We have a winner!”)
return True
else:
return False
# Here is my program
printboard()
turn = ‘X’
while not checkwinner():
space= input(“Where do you want to go: “)
if space.isnumeric():
space = int(space)
if space 9:
print (‘sorry buddy – not valid’)
else:
board[space-1]=turn
printboard()
else:
the game has yo work and respect those 5 things

For This or a Similar Paper Click To Order Now

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00