New course! Every coder should learn Generative AI!
Try a free lesson0
Plz check this code .After 1 attempt the result is coming wrong.Plz help and thanks in advance.
I will be thankful to you. https://code.sololearn.com/WmlzxP6cWO0U/?ref=app
4 Answers
+ 3
I ran it. You are not clearing the values after a successful game. Therefore the first game runs fine and later in the next game the values are continued.
https://code.sololearn.com/WyAwj6q8kcTf/?ref=app
I have reinitialized the values. It is running fine now. Do mention if there is still an error.
+ 3
The code is now public. You can see it.
+ 3
I also did some changes. Hope you like it.
+ 3
I have tried to improved the condition check for winning/draw/errors. But still one problem remains, multiple inputs can be given in the same box.