“Run the App” Exercise (Tic Tac Toe)

In this exercise, we’ll practice downloading, configuring, and running an existing Python application.

We’ll discuss topics related to command line computing, Anaconda virtual environments, Python package management, and environment variables.

Instructions

  1. Visit this “Tic Tac Toe” repository on GitHub. This repository contains a simple command-line game. We’ll refer to this repository as the “upstream” remote repository.
  2. Click the “Fork” button (top right of the page) to make a copy of the repo under your own control. We’ll refer to your forked copy as the “origin” remote repository.
  3. Follow the instructions in the repository’s “README.md” file to install, setup and run the Python code contained inside:
    1. Click the green button on GitHub to “Clone”, or download, your remote fork. Choose the GitHub Desktop option, selecting the “for my own purposes” option, if prompted by GitHub Desktop. When prompted where to download it, choose a familiar location like the Desktop. We’ll refer to this as the “local repository”.
    2. Use the finder or file explorer to verify you have downloaded the files and they exist, for example on your Desktop.
    3. Use the command-line to navigate to the local repository (using one or more cd commands).
    4. Use the conda utility to create a new virtual environment with the specified version of Python, then activate the virtual environment.
    5. Use the pip utility to install any required third-party packages specified in the repo’s “requirements.txt” file.
    6. Use the python utility to run the Python file(s) as described in the README’s “Usage” section.

Success Criteria

Once you have played a single game, you will have succeeded.

For fun, try replaying the game against different kinds of opponents (computer, human, etc.).

Further Exploration

Optionally simulate many games between computer players, and see the CSV file of game outcomes that gets produced.

Practice passing environment variables to customize the game count and player types.

Troubleshooting & Help