Your First Python Program

In the previous tutorial you learnt 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!")

Output

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!")
Did you find this article helpful?