Software for CS111

This page provides links to download software for this class onto your personal laptop. In an ideal scenario, all three programs would be downloaded to your personal laptop before the first day of class.

CS111 students need the following:

  1. Thonny (to write/run Python code)
  2. Download and run a test Jupyter notebook (see details below)
  3. Test the 111Downloader.py script on your computer (see details below)

If you encounter problems with the installation process, please email Peter Mawhorter (pmawhort).

Instructions

1. Thonny

The Thonny logo, a hand-drawn T and H You can download installers for Thonny below. By clicking on the blue links below, the installer will automatically download to your machine. Double-click on the installer, and it will start the process of installing Thonny.

You'll see this screen when the installer starts (although note that we're now going to be using version 4.1.4, not 3.3.13):

Thonny 3.3.13 installer welcome screen

Click through each of the sections (License, Destination Select, Installation Type, Installation, Summary). When given options, if you are uncertain, use the default suggested by the installer. Eventually, you will arrive at this screen:

Thonny 3.3.13 installer finish screen

which tells you that Thonny was successfully installed on your machine. We will review how to use Thonny during the first lab.

2. Test a Jupyter notebook

We'll use Jupyter notebooks in lab where you can write and run python code.

Please use this link to download a zip file containing the launchNotebook.py program and a Jupyter notebook for testing.

Instructions:

  1. Clicking on the link above should automatically download the cs111_setup.zip file to your computer. This file should end up in your Downloads folder.
  2. In the Downloads folder, Unzip the cs111_setup.zip file, which creates the folder cs111. Some systems automatically unzip the file to create the folder. If not, you'll need to do it manually:
    • To unzip a .zip file on a Mac, double-click it.
    • To unzip a .zip file on Windows, right-click and choose Extract here.
  3. Move this cs111 folder to a place where you want to keep it all semester. Your Desktop is one easy place to put it, but you could also put it in your Documents folder, or another folder where you keep your class files organized.
  4. Using Thonny, open the launchNotebook.py file in the cs111 folder, wherever you placed it. To do this in Thonny, from the File menu, select Open, and navigate to your cs111 folder, and the launchNotebook.py file within the cs111 folder Select launchNotebook.py and press the Open button. At this point, your Thonny window should be displaying the launchNotebook.py file in the editor pane at the top of the window, and the Python shell at the bottom of the window should be mostly empty, like this: A Thonny window with the file launchNotebook.py in the editor pane

  5. Click the Thonny run button The Thonny run button (or choose Run current script from the Run menu) to run the launchNotebook.py file. It may take a moment because it has to install some things, but this should only be necessary once. It should display a bunch of output in the Pythton shell at the bottom of the Thonny window, and eventually launch a tab in your web browser, displaying the contents of the cs111 folder. You will use this tab (which you can get back by running launchNotebook.py again) to launch all of the notebooks for this class.

    Note: If you get an error message at this step saying "looks like this file or folder is not writeable" it probably means you are on Windows and have forgotten to unzip the zip file.

  6. In the browser tab, navigate to the notebook_test folder and open the cs111_setup_test.ipynb file you find there. This will open a second browser tab which runs the notebook.

  7. Make sure the notebook is working. Follow the directions in the notebook and confirm that it displays the message "Python is working in this notebook" (in addition to the code which has that message along with extra quotation marks and commas). It should look like this:

    A screenshot showing the 'Python is working' message described above, displayed below a 'CS 111 Setup Test Notebook' cell with some text in it, followed by a 'Testing basic Python' cell with some code in it.

If you run into trouble following these steps, please email Prof. Mawhorter (pmawhort) for help.

For lectures and exercises in this class, you will be downloading zip files containing notebooks. Once you have extracted these zip files, you should put the resulting folders into the cs111 folder you created in this step.

3. Test the Downloader Script

For your convenience, we've provided a downloader script which checks the CS 111 website for updates and downloads any new files it finds, unzipping any zip files automatically. You can simply run this script to check for and download new lecture, exercise, project, and lab files. For now, you should run it once to make sure it works on your system, by following these instructions:

  1. The 111Downloader.py script is included in the cs111 folder that you unzipped in the previous section. Just like launchNotebook.py, open it using Thonny.
  2. Run the script, and it should display messages about what it's searching for and what it downloads. For now, it should download at least the first week's exercises, since those are already linked on the schedule.
  3. Check your cs111 folder for a new exercises folder that contains a sub-folder for the week 1 exercises.

As before, if you have any problems running the downloader script please email Prof. Mawhorter (pmawhort) for help.

Links to Notebook Launchers

These links have the most recent version of a few different scripts that are useful for managing Jupyter Notebooks, in case you need to download them individually. Each of these is included in the cs111 folder you already downloaded, but they may be updated here if necessary as the semester progresses. If you need to re-download one of them, right-click and select "save as" to download the file.