Printing "Hello, World!" is a kind of ritual that start the journey every programmer.
According to Wikipedia:
A "Hello, World!" program generally is a computer program that outputs or displays the message "Hello, World!". Such a program is very simple in most programming languages, and is often used to illustrate the basic syntax of a programming language. It is often the first program written by people learning to code.
In this post I will show you how to print
"Hello, World!" in Python
This is first post and I am scared
[skip this step if you have already installed it]
Just head to https://python.org/download/ and download the install the program supported by your os, i.e. .msi for windows and .dmg for mac
In the windows you have to tick the check box saying Add Python3.xx to path
For Linux you have to open an application named terminal and type the following command, make sure you are connected to internet and have
Command to install python on Linux
sudo apt-get install python3.8
Open a suitable text editor of your choice and type the following code and save it in
Here we are printing the "Hello, World!" with
It is a built-in function in python which helps to print thing in the console window
If you wish you can skip this section
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.
In windows, open the folder in where is your program is located and press
shift + right click to open the context menu and select the
Open with powershell option
In Linux/Unix, open the folder in where is your program is located and press
right click to open the context menu and select the
Open in Terminal option
Now in the terminal type the following command
The following thing will be print
So that was a simple tutorial on how to print "Hello, World!" in Python.
Well then see you all next time.