Programmers usually start writing their first program with “Hello World”. We will also start with “Hello World” here. However, to run your first Python program, you must have Python installed and the environment set up. Otherwise, if there are any errors, an error message will be displayed during the run.

To start, write and run the following code in the program window:

print("Hello World")

Upon running, we will see the text:

Hello World

That completes our first Python program. In this program, we learned how to write and run a piece of Python code.

Here, print() is a library function in Python. This function is included by default as a built-in function in Python. These built-in functions are always used in our code. We can also use our own custom functions. Whatever you put inside the parentheses () of this function will be displayed as output. Python is unique in this way because we do not need to declare data types separately. Printing is done in one line where other languages might require several lines to print “Hello World”.

0 0 votes
Article Rating
Would love your thoughts, please comment.x