- Start up the IDLE. Then under File, select New Window or prss CTRL + N, which will open up an untitled window. This is where we will be writing our first program.
- In the untitled window, write your first program
- Give the file a name and save it (hello.py in this case)
- Next, under Run, select Run Module
- Now in the main window (IDLE SHELL), you will see the output as shown below:
- The SHELL is restarted every time one runs a module in IDLE. We can now proceed to writing full length programs!
So, after installation of python, we need to update the environment variable PATH in windows 10.
- Click Windows + Pause, to start the System Properties and update the value for PATH as shown below:
2. Start your command prompt and type : PATH. This should now include the installation directory of Python.
So I have decided to learn two new languages in 2017, beginning 11th April 2017 . For quite a while I wanted to learn Python and ADF and this blog marks the beginning of the journey.
The first post was to install Python and write the Hello World program. I will write new posts as I learn more about these two languages.
- Installing Python : Visit https://www.python.org/ and click on Downloads–>Windows.
- Download the executale. Here I have downloaded python-3.5.2
- Once the executable is downloaded (python-3.5.2-amd64.exe), double click on the file which will lauch the setup.
- Once this is done, navigate to C:\Users\<yourusername>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.5, you should see the following :
- Click on the IDLE (Python 3.5.64-bit) and the python shell is launched.
- And thats it! Takes less than 5 minutes to install python.
- Okey, Finish it up with the customary Hello World program. (The error to show that the parentheses are required from python 3 and above. Print has moved from being just a “statement” to being a “function”!)