Hello, World! - Learn Python

Python is a fantastic and simple language, and has a very straightforward syntax. It encourages programmers to program without premade code.

Hello everybody, today we are going to do the simplest Python script, the famous “hello world script”.

If you are more advanced in python, take a look at your first real python project (you will find this post really interesting).

Hello World Script

To start, the first thing you need is to have Python install in your machine. If you didn’t do that yet, you can find a simple tutorial over here: how to install python in 5 minutes

Once you are done with Python installation, all you have to do is to open your Python IDE. If you are on Windows, you should be able to find it fast. In case you are having troubles, I will leave a little picture of how the icon looks like.

python ide

After you click and open the Python console, you should see something like this:

python console

Ok, now click File -> New File

new python file

A new window should open:

python ide

This will be our text editor (or script editor). Here we will code. Let’s get started.

Type this:

print("Hello World!")

We are done. Now press F5, save the script anywhere you like and it should execute. If everything went as expected, you should see “Hello World!” printed in your screen.

Congratulations! You coded your first Python hello world script.
From now on I will be posting several mini python tutorial so you can learn the basics of coding. If you have any question or would like to see any specific examples, leave me a comment and I will do my best to help you. It may take some time until you get the hang on programming, but once you get used to it you will really enjoy playing around and testing new ideas with python.

Later on, as you learn some more, you can jump to the Python dice simulator example.

See you in the next tutorial!

Leave a comment