Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Can anyone help me fix this game I made?

+7 votes
asked Mar 26 by Michael Gentry (260 points)
reshown Mar 28 by Michael Gentry

So I made this little Tic-Tac-Toe game in Python for fun during spare timehttps://onlinegdb.com/ByLi90jEd (Disclaimer: Yes, I know, this code is repetitive and garbage). It doesn't seem to tell you when you win. It will only tell you when the computer wins. Why? How do I fix this?

2 Answers

+1 vote
answered Mar 29 by Peter Minarik (22,320 points)
selected Mar 29 by Michael Gentry
Best answer

In line 10, change the right-shift operator (>>) to greater-than operator (>).

while Availablespacescounter > 0:

With this, the code seems to work for me.

commented Mar 29 by Michael Gentry (260 points)
Thanks for the answer! :)
0 votes
answered 6 days ago by Kyzer Maynard (180 points)
hey Michael it still didn't tell me when I won diagonally
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.