We recommend using Atom to create and edit Python programs. You may use other code editors, but we will be using Atom in lecture.

To install Atom, go to the Atom website . You should see a yellow "Download" button, which has your computer system's OS information above it. Click on that button.

Configuring Preferences

Python treats spaces and tabs very differently. If you accidentally put a tab in your program when a space was expected or vice versa, it could cause your program to crash. And you will have a hard time finding it because both tabs and spaces look exactly the same.

Most of the time, this is not a problem. However, we must first configure Atom so that indentation is consistent across all of our files. First, open Atom. Then, open the Settings menu option; in Windows, it is under the File category, and in Mac, it is under Atom (and is named Preferences ). Then, in the settings window that opens, select the Editor category, and scroll down. First, check the boxes "Show Indent Guide" and "Show Invisibles" so that your settings match this image:

Click for Bigger Image

This will allow you to see both tabs and spaces, and to tell the difference between both. Spaces will look like light dots which are centered vertically on each line. Tabs will look like two '>' characters next to each other. These are illustrated in the examples below.

Atom with Tabs (Bad) Spaces Only (Good)

Continue scrolling down. Change the value in "Tab Length" to 4, and click on the value in "Tab Type". This should open a drop-down menu. Select "soft". This will make Atom automatically replace all Tabs you input with 4 spaces. After configuring, these two settings should look like this:

Click for Bigger Image