DEV Community

Cover image for PYTHON 101 : Introduction to Modern Python
AbogeJr
AbogeJr

Posted on

PYTHON 101 : Introduction to Modern Python

Python! No, not the non-venomous snake, the programming language. Python is a high level programming language released in 1991 - fathered by the legendary Guido van Rossum. Over the years, Python has gained popularity due to its relatively simple syntax and versatility. It has countless use cases such as Web Development, Data Science, Machine Learning, Artificial Intelligence and automation just to mention a few.
This article will walk you through one of the greatest human inventions since sliced bread, the Python Programming language!

Getting Started with Python

Just like most programming languages, Python requires an environment to be set up in your computer. Luckily, it's very easy to do so. As popular as it is in the tech space to pick up the latest version of everything, it is advisable to install a version or two below the latest release(for stability purposes).

Step 1
Visit The Python Download Page

Python Download Page

Step 2
Select a version to download. I personally went with 3.9.10. Then, go ahead and select an installer based on your Operating System.

installer

Step 3
Run the installation executable.

installation

Step 4
Install Python and the available dependencies. Make sure to add Python to Path!.

Run

Loading

Wait...
wait

Voila!
Done

To check that Python was successfully installed and added to path, open up your command prompt.
Key in:

python --version
Enter fullscreen mode Exit fullscreen mode

You should see something along the lines of:

cmd

We're all set!

Let's Go

Now to the fun part. Let's code!

Building your first Python program

As fun as it would be for us to build an AI face recognition system, that is far beyond the scope of this article and quite frankly, my expertise. We will have to settle for the illustrious "Hello World" program.

On your desktop or destination of your choice, create a new text file.

hello

In the text file type the following code:

print("Hello World")
Enter fullscreen mode Exit fullscreen mode

hello world

Change the .txt extension in the text file to a .py extension.

Expect something similar to this:

python file

(Tip: When using modern text editors e.g. VS Code, you can create a .py file directly and write code in it).

To run the Python Script we'll have to visit our pal, the command line.

To navigate to the directory containing the 'hello.py' file (In my case, Desktop). Run the command:

cd Desktop
Enter fullscreen mode Exit fullscreen mode

Then run:

python hello.py
Enter fullscreen mode Exit fullscreen mode

You should be staring at a similar output;

aj

Congratulations! You just wrote your first Python program. Time to start applying to those remote senior software engineering positions on indeed!

sike
Sike!

Patience young grasshopper. The journey has just but begun. So before you add Python to your resume and LinkedIn skills, here are some of the best FREE resources you can get your hands on:

Codecademy Python Tutorial
W3schools Python Tutorial
Amigoscode Python Tutorial

These will surely give you a good bearing with regards to becoming a Pythonista(yes, this is a thing).

Code Away! And remember, consistency is key

Coder

I hope you enjoyed reading this article as much I enjoyed writing it. If nothing else, at least you learnt that pythons are actually non-venomous!

Good luck on your Pythonista journey. Godspeed!

Top comments (0)