Learning how to program (using python)

Lesson 1: installing

On Linux

Type: sudo apt-get install python

Now python is installed.

On windows

  1. open http://python.org/getit/ in a new window.
  2. Click to download the windows installer for version 2.7.2 (or the latest version).
  3. Run the downloaded file. Click through the instructions (click next a bunch of times, then click finish).

Now python is installed.

Lesson 2: Hello World

This is a simple python program that prints "Hello World!"

In an editor (for example notepad or vi) create a file with the following contents:

Save it as a file named hello.py.

To run it: