Display ” Hello World” using Python

Python is a programming language and one of the most widely used language. Python is a simple language and anyone without prior programming experience can learn it.

In this blog, we will use python to display “Hello World”.

Open Python editor.

Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

Now at the prompt >> type print and in brackets write Hello World. Hello World is a string and it should be enclosed within single or double quotes. Below string is enclosed in single quotes

>> print(‘Hello World’)
Hello World

Below string is enclosed in double quotes

>> print(“Hello World”)
Hello World

We can also assign string value to variable and display the content of  that variable using print statement

>> a = ‘Hello World’
>>> print(a)
Hello World

Display string “Hello World” 3 times.

>> b = ‘Python’
>>> print(b*3)




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s