Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1=1
- x2=2
- x3=3
- x4=4
- x5=5
- x6=6
- x7=7
- x8=8
- x9=9
- x="X"
- o="O"
- a=0
- print("press any letter to end the program")
- print(".")
- print(".")
- print(".")
- print("press a number from the grid to play")
- print(x1,"!",x2,"!",x3)
- print("---------")
- print(x4,"!",x5,"!",x6)
- print("---------")
- print(x7,"!",x8,"!",x9)
- while a < 9:
- print("o move")
- y = int(input())
- if y == x1:x1=o
- if y==x2:x2=o
- if y==x3:x3=o
- if y==x4:x4=o
- if y==x5:x5=o
- if y==x6:x6=o
- if y==x7:x7=o
- if y==x8:x8=o
- if y==x9:x9=o
- print(x1,"!",x2,"!",x3)
- print("---------")
- print(x4,"!",x5,"!",x6)
- print("---------")
- print(x7,"!",x8,"!",x9)
- a=a+1
- if a<9:
- print("x move")
- c = int(input())
- if c == x1:x1=x
- if c==x2:x2=x
- if c==x3:x3=x
- if c==x4:x4=x
- if c==x5:x5=x
- if c==x6:x6=x
- if c==x7:x7=x
- if c==x8:x8=x
- if c==x9:x9=x
- print(x1,"!",x2,"!",x3)
- print("---------")
- print(x4,"!",x5,"!",x6)
- print("---------")
- print(x7,"!",x8,"!",x9)
- a=a+1
- print("gg a celui qui a gagne")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement