Your First Python Program – “Hello, World!”

Hello, World!

In the last tutorials, we learned how to install Python on our machine, and then we learned how to set up the Anaconda environment. So now we are ready to write our first Python program. We will write a simple program to print ‘Hello, World!’ on the screen. ‘Hello, World!’ is the classic and time-honored example in computer programming. This example illustrates the basic syntax of programming languages. It is a simple code for beginners. We will start our coding journey through this simple program.

To run our first program we can use IDLE or Python interpreter. We will use the print() function in this program. print() is a simple inbuilt function which is used to show output on the screen.

So here we have the code-

#---------
print('Hello, World!')
#---------

This simple one line code will print Hello, World! on our computer screen.

Here you can see screenshot of output –

Open Python IDLE and write code of as per above and press Enter key-

Output in Python Interpreter

Open Python Interpreter and write code of as per above and press Enter key-

output in Python IDLE

Congratulations! You have written your first python program successfully. Keep you stay tuned with us for further more tutorials on Python.

1 thought on “Your First Python Program – “Hello, World!””

Leave a Comment

Your email address will not be published. Required fields are marked *