Hello World Program in Python

In this article, you will learn to write First Python Program and also take a look of Python IDLE.

Start with first Python program – Let’s create or write a very simple program called Hello World. A “Hello, World!” is a simple program that outputs Hello, World!

Since it’s a very simple program, it’s often used to introduce a new programming language to beginners.

Type the following code in any text editor such as VS code or an IDE and save it as hello_world.py or with any name which suits you right but file extension will be (.py).

print("Hello, World!")

print() function in Python is a function that allows Python to display output in Terminal or Python Console.

Hello World Program

After running it, you will get the following output.

Note: If VS Code is not installed yet, then install it from Visual Studio Code

Congratulations! You have executed your first program in Python. As you done your first program in Python, you have entered in the world of programming.

As you can see that how much easy task it was. So, this is the beauty of Python language which let you do programming in just fewer lines.

The Python IDLE – To test or write short and few lines of code in Python is pretty simple and for that we don’t need to use any kind of text editor, it can be easily done in IDLE. It is because Python can be run as a command line itself.

Let’s write “Hello, World!” in the IDLE:

Print(“Hello World”)
Hello World Program

After running it, you will get the following output.

From there you can write short line of code including our first program (Hello, World!).

When you are done with executed code in command line, you can easily quit the python command line interface or come out from it by following type:

exit()
Hello World Program

Click to read Introduction to Python

If you find anything incorrect in above discussed topic and have any further question, please comment down below.

Follow Us

5 thoughts on “Hello World Program in Python”

  1. Heya i am for the first time here. I came across this board and I find It really useful & it
    helped me out a lot. I hope to give something back and
    help others like you helped me.

    Reply

Leave a Comment

Stay in the loop

codingstreets