I have decided that I will blog about programming in Python and before we can start coding we need to install the interpreter on ourĀ operating system. Python is available on Linux, Windows and Mac OS X and you can download the installer fromĀ here.

If you are an Ubuntu user like myself use the following command in your terminal to install Python:

sudo apt-get install python

After you have installed Python, go and open your favourite text editor and enter the following code and save it as HelloWorld.py:

print "Hello, World"

From a command line or terminal enter the following command to execute the script to see the the output result:

python HelloWorld.py

Ok now you have written your first Python code!

Shares