Plz check this code .After 1 attempt the result is coming wrong.Plz help and thanks in advance. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

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

14th Jun 2020, 3:11 PM
Aditya sahani
Aditya sahani - avatar
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.
16th Jun 2020, 9:56 AM
Prabhanshu Chaturvedi
+ 3
The code is now public. You can see it.
20th Jun 2020, 5:31 PM
Prabhanshu Chaturvedi
+ 3
I also did some changes. Hope you like it.
20th Jun 2020, 5:32 PM
Prabhanshu Chaturvedi
+ 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.
23rd Jun 2020, 3:22 PM
Prabhanshu Chaturvedi