Skip to main content

Posts

Featured

Tic tac toe game

Milestone 1 basic code for Udemy's Bootcamp Python Course The project is to make a Tic tac toe game.Print the game board after every move! Try it yourself it's the easiest thing I have ever done!I did it in 30 mins. So it can take time depending on your Python and Understanding of the game itself. This is how it looks like So here's the code in Python. Please follow me on github: www.github.com/fivecube 1: def check(board,k): 2: if board[0][0]==k and board[1][1]==k and board[2][2]==k: 3: print(k,"wins") 4: return 1 5: if board[0][0] == k and board[0][1]==k and board[0][2]==k: 6: print(k, "wins") 7: return 1 8: if board[0][0] == k and board[1][0]==k and board[2][0]==k: 9: print(k, "wins") 10: return 1 11: if board[1][0] == k and board[1][1]==k and board[1][2]==k: 12: print(k, "wins") 13: return 1 14: if board[2][0] == k and board[2][1]==k

Latest Posts

Snackdown Round 1A

Snackdown 2019 Problem Teammate

The_beginning