Installing python and learning python ( part-1 )


Python was developed by Guido Van Rossum in in 1980s in Netherlands as a successor to ABC programming language. Python community has given him the title, Benevolent Dictator for Life ( BDFL ) which means that he will be principal mentor of Python language.

Python 2.0 incorporates features like garbage collector, support for unicode and transparent development.

This will include details about installing python in windows and some programs:

Installation procedure:

Step 1: Download python 2.7.9 from this link: https://www.python.org/downloads

Step 2: Install it, these screen shots will guide you.

SnapCrab_NoName_2015-1-15_21-54-34_No-00

Click on Run

SnapCrab_NoName_2015-1-15_22-51-3_No-00

Choose Install for all users

SnapCrab_NoName_2015-1-15_22-53-33_No-00

Click on Next

SnapCrab_NoName_2015-1-15_22-55-29_No-00

Scroll down, click on drop down icon beside Add python.exe to the path.

SnapCrab_NoName_2015-1-15_22-57-1_No-00

Choose ‘Entire feature will be installed on local had drive’ option so that it can be added to variables automatically. Then click on ‘Next’

SnapCrab_NoName_2015-1-15_23-0-4_No-00

Then windows installer should install Python 2.7.9 for you.

SnapCrab_NoName_2015-1-15_23-4-29_No-00

Click on ‘Finish’

Now open My computer, right click, go to ‘Properties’. Click on ‘Advanced System Settings’, go to “Environment Variables’.

SnapCrab_NoName_2015-1-15_23-9-23_No-00

Click on ‘New’ button under System variables.

SnapCrab_NoName_2015-1-15_23-12-9_No-00Let the variable name be Python and variable value be C:\Python27. Click on Okay.

Scroll down in system variables till you find ‘Path’ variable. Edit it, add ;C:\Python27 to the end of variable value.

SnapCrab_NoName_2015-1-15_23-21-9_No-00Then click on ‘Okay’. Restart your system.

After restarting your system, open cmd, type ‘python’ and it should show you an output as shown in the screen shot:

SnapCrab_NoName_2015-1-15_23-34-3_No-00

Type print Hello. It will return an error message:

SnapCrab_NoName_2015-1-15_23-35-42_No-00Let us put double quotes around Hello now.

SnapCrab_NoName_2015-1-15_23-36-50_No-00Voila! You’ve written Hello World program in Python successfully 🙂
Note: Python is extremely strict about code indentation. We’ll deal with this in part 2.

You can perform basic arithmetic operations like addition, subtraction, multiplication and division.

For ex: Just enter 2+3 in python shell and it will return 5 as answer.

More programs and more explanation in part 2. Stay tuned 🙂

One Comment

Leave a comment