Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
shuru
#python 3.5.2 print("Tic tac toe") board = ["-", "-", "-", "-", "-", "-", "-", "-", "-"] def disp(board): print(board[0] + " | " + board[1] + " | " + board[2] + " 1 | 2 | 3") print(board[3] + " | " + board[4] + " | " + board[5] + " 4 | 5 | 6") print(board[6] + " | " + board[7] + " | " + board[8] + " 7 | 8 | 9") print("X's Turn.") print("Choose a position from 1-9\n") pos=int(input()) if pos==1: board[0]="x" disp(board) elif pos==2: board[1]="x" disp(board) elif pos==3: board[2]="x" disp(board) elif pos==4: board[3]="x" disp(board) elif pos==5: board[4]="x" disp(board) elif pos==6: board[5]="x" disp(board) elif pos==7: board[6]="x" disp(board) elif pos==8: board[7]="x" disp(board) elif pos==9: board[8]="x" disp(board) else: print("pls insert between 1 to 9")
run
|
edit
|
history
|
help
0
Faiha Lesson 2
Q2
PyQueue
http://rextester.com/HYVN80193
sainik
PyWordQuant
Prime Factors
number factor memoised
mul table
Sk