Python is one of the most efficient, and easy to learn programming language with the simplest syntax. Python has the following two versions:

  1. Python 2
  2. Python 3

There is a major difference between python 2 and python 3. For instance, one difference is the print statement. In python 2, the print statement is not a function. It is considered as a simple statement. Whenever we use the print statement in python 2, we do not use the parenthesis. On the other hand in python 3, print is a function and it is followed by the parenthesis.

In any programming language, the simplest “Hello World” program is used to demonstrate the syntax of the programming language. In this article, we create the “Hello World” program in python 3. Spyder3 editor is used to creating and running the python script.

Creating a Hello World Program

For creating the Hello World program, you will need to perform the following steps

  • Open the Spyder3 editor.

How to Create a Python Hello World Program Python

  • Go to the “File” menu and click on “New File”. A new python file will be created.

How to Create a Python Hello World Program Python

  • Now simply write the program print(“Hello World”)

How to Create a Python Hello World Program Python

  • Click on the “Run” button.

How to Create a Python Hello World Program Python

  • After clicking on the “Run” button, a window will be prompted. Type the name of the file that you want to assign to this file. We give the “Hello World” name to file. After that, choose the directory where you want to save this file and click on the “Save” button.

How to Create a Python Hello World Program Python

  • If you are running a spyder3 editor for the first time, then you have to run the setting for your newly created python script. In the console, the menu chooses “Execute in current console” and in the working directory settings menu choose the first option “The directory of the file being executed” and click on the “Run” button.

How to Create a Python Hello World Program Python

  • Finally, you can see the output “Hello World” on the console.

How to Create a Python Hello World Program Python

Conclusion

In this article, we have described how you can create your first program “Hello World” in python. By following the steps described in this article you can easily create the “Hello World” program.

About the author

How to Create a Python Hello World Program Python

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn.