Hello World in Python 3

Hello, photo
Photo by Maria Tyutina from Pexels

The classic "Hello, World" program is usually showed in courses and books as the first program that every programmer or student should write when approaching a new language. It is a very simple program that only outputs the sentence "Hello, World".

How to write the "Hello, World" program in Python 3:

Hello World on Python 3.6

In Python, all we need to perform this task is to write the following line in any Python IDE, text editor, or interpreter:

print("Hello World")

The result will be the following:

Hello World

Understanding the Program

This time, we are running a Python 3 shell; an interpreter where can introduce multiple functions and variables, that will run at the moment we press "Enter" on our keyboard, one line at a time (Excepting loops and functions definitions).
We are calling the prebuilt print() function, which allows us to show messages on the screen. As it is a function, we have to put a parenthesis, and we are passing the arguments that the print() function needs to work.
The argument that the print() function gets is a string of characters, in this case, the sentence "Hello World". As it is a sentence and not the name of a variable or a function, we need to put it between quotation marks.

Comments

  1. Slots Casino | LuckyClub
    Get started with a list of the most popular slots games you can play at LuckyClub. Get started with a list of the most popular slots games you can play at LuckyClub. Get started with a list of luckyclub the most popular slots games you can

    ReplyDelete

Post a Comment

Popular posts from this blog

How to install Spyder 3 on Windows without Anaconda

How to install PyQt5 and Qt Designer on Ubuntu