Hello, World! (Rite of passage)

Source: Towards data science
I successfully completed the rite of passage for any new developer. Printing out "Hello World". Interestingly, there is history to this phrase and was first used in a book about programming on C which was again inherited from an internal memo at Bell Laboratories.

Python is a syntax easy language meaning you don't have to remember a lot of Python keywords as they are similar to English. For example, I've seen in some language where print is shown as println and the use of flower brackets{}.

In Python, we print hello world with the following syntax:

print("Hello, World!")

Here, the keyword 'print' is a function which basically prints out anything on to the screen. The parenthesis used is to give Arguments or in simple words, whatever you want to print to the screen.

A function is a set of instructions combined into a single keyword to reduce repetition of code. For example, in the print() function, it basically says to print whatever arguments or statements you want to the screen. As it involves multiple steps like understanding what to be printed, decoding to machine language and then finally throwing the output, a built-in function helps in getting straight to printing with a neat function keyword print().

The double quotes is important as it differentiates a String from other types. Basically, it is a way of instructing the Python interpreter that it is a string and that entire thing in-between quotes needs to be printed as is on the screen.

A Python interpreter is basically a program that understands Python code and outputs the result of that code.

So, hope this was helpful as it was for me. While writing out this post, I discovered a few concepts myself. Good exercise!

print("Goodbye, World")

Comments

Popular posts from this blog

Restrooms and corporate management!!! - bullshit

Howdy!

An exhilerating experience