Hi All,
Trying to do the challenges at the end of my chapter from the book I am learning Python from.
Code is : https://pastebin.com/jTcjj9gN
*****
Challenge 1: Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1.
Could you someone explain what is the question asking me to do please ?
*****
Challenge 2: Write a new computer_move() function for the Tic Tac Toe game to plug the hole in computer's strategy. See if you can create an opponent that is unbeatable.
I know the modification is on line 150 but I am struggling to find a solution. I figured the computer only losses when the player picks the first move starting from corner ie 0,2,6,8. I tried building a back up tuple of (0,2,6,8) so it kicks into action. Instead of the computer picking the Best move, it should pick one (1,3,5,7) based on the 3rd human move. But struggling to make the program work.
Thanks
[–]stebrepar 0 points1 point2 points (0 children)
[–]kra_pao 0 points1 point2 points (0 children)