Posts

Showing posts from July, 2018

Hello World in Python 3

Image
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: 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 par