How to Start Programming with Python



What is Python?

In the official Python website they say that



How to install Python?

Installing Python is as easy as drinking a coffee. Follow these instructions to install Python

  1. At first provide a coffee for yourself
  2. Download the version you like  from the official website (Python 2 or 3)
  3. Run  the setup
  4. Install it the root drive ( for instance C:\Python )
  5. Start drinking your coffee while it is installing on your computer
  6. Setup will finish before your coffee finishes

That’s all about Python installation but I myself rather to use it in command line wherever in windos so that I have to add its path to windows variables. To do this open the Advanced System Settings (former System Properties) and add Python path to it like the following picture

Add Python Path to windows Environment Variables

Add Python Path to windows Environment Variables

How to Write Hello World Application in Python

Python syntax is ridiculously easy to learn. To write your first application in Python you have two options.

          First : use Windows Command Line

          Second : Use Python Editor (IDLE)

To code within the windows command prompt First Open Command Prompt

Write python and press enter

Python command line will appear and you can start coding. To write first command write
print (“Hello World”) // write print in lower case

and press enter then you will see the result in the next line

Python Hello World with Windows Command Prompt

Python Hello World with Windows Command Prompt

To write your application in IDLE you have to open the editor from Start Menu>Python x.x>IDLE
Then again write print (“hello world”) and press enter

Python Hello World Using Python IDLE Editor

Python Hello World Using Python IDLE Editor

As you can see coding in Python is a peace of cake and I strongly recommend you to start programming in Python for your daily usages if you have such a need. It helped me a lot and I learned a lot from its concept in a short time. It worth to try it even once. You can share your experiences with Python or Ruby or other similar tools here.