Member-only story
Introduction to Python for Data Science — Part 2
Start Programming with Python
This is the most complex and heavier article of the series of three. Take your time to understand all the content and it will pay off. If You haven’t read part 1, you can find it here:
In this article, we will be introduced to some basic concepts about Python language and programming in general. I recommend you test all code written here and experience yourself with new and different problems.
Python Syntax
As we have seen in the previous article, Python is an interpreted language, which means that we can execute small code portions without having to compile the code and execute the whole program. Programming languages obey strict writing rules. Any failure of one of the writing rules will result in an error, even if the logic and variables are well-defined. In many programming languages, the most common syntax errors are commas, semicolons, or parentheses. In the case of Python, what defines small sections of code are indentations, and therefore, most syntax errors are related to indentations. We have already written our first program to print ‘Hello World!’…