Your First Python Program

In the previous tutorial, you learned how to install Python on your computer. Now, let's learn how to write a simple Python program.

We will write a simple program that displays Hello, World! on the screen.

print("Hello, World!")


Hello World!

Working of the Program

Let's see how the above program works:

Hello World Code
Hello World Code

In Python, anything inside print() is displayed on the screen.

There are two things to note about print():

  • Everything we want to display on the screen is included inside the parentheses ().
  • The text we want to print is placed within double quotes " ".

We can also use single quotes to print text on the screen.

For example,

print('Hello World!')

is same as

print("Hello World!")

Note: We have used Hello World as your first Python program since it's beginner-friendly and is used everywhere to introduce a new programming language.

And it's okay if you don't understand it now. We will explain all the underlying concepts in our upcoming tutorials.

Video: Introduction to Python

Did you find this article helpful?