Sunday, 19 November 2017

Python Hello World

Hello friends how are you!!! today you will learn how to program in python. In this lesson we create a simple Hello World program using python.

Hello World Python:
     In this tutorial we are going to use the traditional "Hello, World!" program. And the purpose of "Hello, World!" is not an exercise to find the simplest form of code in a particular language, or anything like that. Its actually to learn about the development environment, and this is what we called development cycle (it takes to edit, and to test, and to change, and to test and to run code in a particular environment). And so for this purpose we use the simplest form of a program itself, so that can get out of the way and then we can focus on the environment.


In this case, I have this up here on the screen in Eclipse. And this is Eclipse using Pydev, which is a Python development environment that runs inside of Eclipse.

 

         Eclipse is an integrated development environment originally written for developing in Java, but it has plug- ins for a lot of different languages. And Pydev is actually a pretty good plug-in for the Python language. And so, we will be using this throughout this course.You do not have to use Eclipse, and if you have some other development environment that you prefer, or you just want to use an editor and a command line, that's perfectly fine. In the above screen shot I have created a python project named "Tutorial" and in that project I have created a ".py" file named "HelloWold.py". 

Now its time to write our first program. In the Eclipse editor write the below code to print your first program.
     print("Hello, Wrold!") 

 

 In Eclipse, if I want to run this Hello, World!, I simply click on this Run button up here, and it will ask me, How I want to run it? and I am going to select Python Run. I only need to do this the first time I run a script.So I am going to say OK.