Python is a opensource programming language created by Guido van Rossum in 1991.He invented this awesome language where he wanted to use a better user level language for the operation system “amoeba”.A short and brief introduction of his project and himself can be viewed by clicking here.
People use Python for many purposes, to make games, build web applications, solve business problems, and develop internal tools at all kind of interesting companies.Python is also used heavily in scientific fields for academic research and applied work.From this post I will show you how to install python to Windows-OS and write a simple program using Python.. Lest start…
The easiest way is with Windows-OS, install python and notepad++. The official web site to download python can be directed from HERE, or you can download it from a very cool site ninite.com. From this site you can download both Python and notepad++.For my coding purpose I use python 2.7.11, you can use latest version 3.5.1.The installer will detect what Windows version you are using and which platform i.e. 32bit or 64bit. It will then download the correct versions and install them for you automatically.
Installing is simple as it does not need a specific knowledge ,just like installing a drive for your machine
After installing go to the search bar and type python and you will see a python command line desktop application, Just click it and you will find a command-line interface as follows
Hope you have downloaded notepad++ too. So let’s write our 1st program to print ‘Hello Python’.In the 1st step you have to open notepad++ and write this.
# My 1st Program
print ‘Hello Python’
In Python for comments “#” mark is used, and end of a statement don’t need to put a semicolon.After writing this save it as ABC.py where ABC is any name and py is python extension to save ( Like hello.c in C programming). After saving the document in notepad++, you can clearly see that codes that you wrote became colored as follows.
After saving the file, no need to compile, just need to direct the file where are you from command line interface.
(To changing a directory file “cd” keyword is used to see what’s inside a folder “dir” is used ). After directing to the relevant folder you just need to type the name of the file you saved, in my case hello.py. So after typing this you can see your 1st program output from command-line as follows.
So, we did our 1st programming code and got the output “YAY”..
If you want to learn more I will recommend a free course provided by Dr Charles Severance. The link is here.