PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# empty slot
e="[ ]"
# x slot
x="[X]"
# o slot
o="[O]"
# the values for the outcome
playing=0
tie=1
x_win=2
o_win=3
# the outcome variable
outcome=playing
# variableeeeeeeeee
a=1
# while loop for choosing who goes first
while a==1:
turn=input("Who's turn is it first? ")
print("")
print("")
# checks if [O]
if turn.lower()=="o" or turn=="0":
turn=o
a=0
# checks if [X]
elif turn.lower()=="x" or turn=="×":
turn=x
a=0
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run