Python in 4 sittings

Problem Set 2

23rd June, 2021

© pi4py.netlify.app

feel free to contact us;

arabindo@protonmail.com

kaustavbasu97@gmail.com

In the session 2 we learnt about the implementation of tic-toe-game. Also given in the worksheet(Part-B, In[1] and In[2])

As we have discussed, there are number of problems.

1. We haven't implement the winning condition yet. So, your task is to implement the winning condition. On the winning condition, program must stop.

(Suggestion- the layman way: Just try to think, when a player can be decleared as a winner? Put that in a simple if else statement.You can use functional approach, to avoid complications while writing code)

2.After you implemented the winning condition, generalise yoyr code, so that it'll run until a winning or a draw, i.e. all field are filled.

These two problems may take sufficient amount of time. So this time, we are trying to being nice with you. :p