23 C
Jaipur
Wednesday, October 28, 2020

How to Create a Python Hello World Program – Linux Hint

Must read

Easy Ways to Keep Your Device Clean Without Antivirus Protection

At some point in time, while using a computer, we all faced system issues from unwanted...

Vdx – An Intuitive Commandline Wrapper To FFmpeg

FFmpeg is a cross-platform, open source audio and video converter. It supports most industry standard codecs and can convert and transcode media files from...

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

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

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

  • Click on the “Run” button.

  • 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.

  • 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.

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

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.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Easy Ways to Keep Your Device Clean Without Antivirus Protection

At some point in time, while using a computer, we all faced system issues from unwanted...

Vdx – An Intuitive Commandline Wrapper To FFmpeg

FFmpeg is a cross-platform, open source audio and video converter. It supports most industry standard codecs and can convert and transcode media files from...

Valorant Tier List: Best Agents In Valorant [Update 1.10]

Valorant, like Counter-Strike: Global Offensive, is a tactical five-person shooter game that has successfully grabbed millions of players worldwide. However, the feature that sets...