CS110: Spring 2020

Intro to Computer Programming with Python

CS110: Spring 2020

Install Visual Studio Code (Optional)

Download

  1. Visit https://code.visualstudio.com/download, and select the platform, by pressing Mac, Windows, or Linux, based on your operating system.
  2. Follow the installation instructions.

Using Visual Studio Code

  1. Using hw04 as an example, unzip hw04.zip to an hw04 folder.
  2. Open Visual Studio Code
  3. Go to the File menu (top, left-hand corner) and select “Add Folder to Workspace…” and navigate to your hw04 folder on your file system. You should see your hw04 folder in a panel on the left-hand side of VS Code. If you do not see it, click on the button on the upper left-hand corner that looks like two sheets of paper.
  4. Open up cars.py
  5. Next, click on the Bug icon (middle button on the far left-hand panel), and click the green play button at the top of your screen to start the debugger. After you click the green button, the python interpreter will run your program. If you get to this point, congratulations — you’ve configured your laptop to run your Python programs for the rest of the quarter.

Notes

  1. If VS Code prompts you to install some python extensions, let it (they will help you run your programs from VS Code).
  2. Make sure that the correct version of python (python 3.x) is being used to run your code. To select from the available python versions, click on the python version in the blue bar on the lower left-hand side of your screen (pictured below), and ensure the correct version of python is selected.