Starting from:

$30

SI507- Homework 1 Solved

Part 1: Debugging (10 points)
Fix the problems in syntaxerrors-harder.py and upload your fixed file.

You may work with another student on this problem. In the Canvas Assignment text field, identify anyone that you worked with. Each student should submit their own version of the file, however.
 

 

Part 2: Tic-Tac-Toe - Program Design (10 points)
Design and start to build a basic tic-tac-toe game. You don’t have to write the code for this program. When completed, your program should work something like this (note that this version uses compass directions to identify the different cells--yours can be different):

$ python ttt.py

CURRENT BOARD:

   |   |

-----------

   |   |

-----------

   |   |

 

X's move C

 

CURRENT BOARD:

   |   |

-----------

   | X |

-----------

   |   |

 

O's move NE

 

CURRENT BOARD:

   |   | O

-----------

   | X |

-----------

   |   |

 

X's move

 

 

And so on...

 

Here is the process

●      Start by writing down on paper or in a text editor all of the subproblems you will need to complete in order to write the program.

●      Open file ttt.py and you can see the partially completed process.

●      Follow the format as shown by Step 1 and Step 5, write function definitions (what the function will do) for steps in between -- think about what the function will need to take in (parameters) and what it will need to return. Specify these in comments.

●      For the full 10 points, you need to have identified at least 3 different sub problems (Yes you can write more than 3 steps between Step 1 and Step 5), written valid function definitions for them, and commented them appropriately.


 

More products