Class 1

  1. Scratch
  2. Setting up python
  3. Homework
  4. Text editor
  5. First program

Scratch

To start getting our heads to think more programmatically, we will start with scratch, a free software built to learn the ideas behind coding from the great people at MIT. linked here.

To start, I would advise you to create a project and play around.

If you get stuck, MIT put out a couple tutorial videos here

While playing around, it is advised to use blocks from the control section, this will help you create more powerful animations.

Setting up python and package managers

For all systems this tutorial should come in handy if you get stuck.

*nix operating systems such as linux, unix, mac osx

Before you start, you may want to read up on a bash primer, or just learn the basic commands.

here is a bash reference. Of course you do not have to know all of them, but some of them you will use more then others, such as: cd, ls, mkdir, find.

Python usually comes installed on these operating systems. To check, open your applications and search for terminal. Once it is opened type

python --version

You should see something like: 2.7.11

If not, you can download python here

Google has put out a setup page for python also, linked here

For mac, a great package manager to have is homebrew, download and instalation is advised.

Windows

Before you start, we will be using the command line, so reading up on a command line reference is advised. You don't need to learn all the commands, just some of the more useful ones (such as cd, dir, find, help, md, move, path)

You can test to see if python is install on your machine opening the cmd application and typing: python --version

if you dont get back a version such as: 2.7.11, then you need to download and install it here

Google has put out a setup page for python also, linked here

Text editor

A text editor is a program that will allow a user to edit text. When you program, you will usually want to use a text editor with a certain text format. For example, when you use microsoft word, the document ends with .doc, you might have seen .pdf, .jpg, .gif or various others, for python we use .py.

Sublime text is a great editor that uses colors and auto complete to make coding easier for the user and better overall experience. You can download it here.

First program

After you download sublime (or you can use any text editor) open a new file and save it as: helloworld.py in the documents

On the first line write:

print("Hello World!")

Save the file and open your terminal/command line. Using your appropriate commands (for windows and *unix use: cd ), change into the directory where your file is saved.

This:

cd documents 

Should work, but you might need to use ls/dir to help find the documents folder. Once you changed into the documents directory write:

python helloworld.py

Which if you have done everything correctly, should write to the screen: Hello World!

Homework Class 1

  1. For homework this class, create a scratch project that involves at least three different control blocks, two motion blocks, two event blocks, and two operators blocks.
  2. Set up python on your machine