Best Way to Learn Python in 2020 : Episode 1
Python is a very popular language.
It’s also one of the languages that I recommend for beginners to start with.
But how do you go about learning Python?
In this article, I divide the path of how to learn Python into 6 levels.
Each level covers a subset of the language that you need to master before you move on to the next one.
My focus on this article is for you to be a competent well-rounded programmer so you can easily get a job at any tech company that you choose
Level 0: The Beginnings
This is the level you begin at if you are an absolute beginner.
And by absolute beginner, I mean someone who has never coded before in Python or any other programming language for that matter.
In this level, most of the concepts you will be learning are general programming concepts. The fundamental skills that will bootstrap you as a programmer.
This means that these concepts are not really exclusive to Python but can be extended to other programming languages as well.
You see, a lot of programming languages are very similar, and knowing what’s common (and what’s not) between programming languages will help you transition into a different one in the future.
Otherwise, Let me give you a very brief introduction about what these concepts mean.
Variables
Variables are essentially storage for data in your program.
More accurately, it’s a way of giving a name for data for later use.
Let’s look at an example.
var = "Hey Guys"
print(var)
Above code snippet var is the variable which stores the value "Hey guys".
Data Types
We talked about variables as storage for data, now let’s talk about data.
In Python, data has types.
For example, in the code snippet above, the data Hello World! has a specific type that Python (and other programming languages) call string.
A String is simply a sequence of characters.
But strings aren't the only data type in Python, there are also integers, floating-point numbers, boolean, lists, tuples, and dictionaries.
By the end of level 0, you need to be comfortable with these data types and understand when (and how) to use them in your program.
Operations
Operations are how you manipulate and change data in your program.
In Python and all programming languages, there exists at least Arithmetic, Comparison, and Logic operations.
Conditionals
In order to write any program that is useful, you almost always will need the ability to check conditions and change the behavior of the program accordingly.
Conditional statements using if ,if else ,else if gives you this ability.
Here is an example of an if-else statement in Python.
>>> if 3 > 5:
print('3 is greater than 5')
else:
print('3 is not greater than 5')
3 is not greater than 5
Functions
A function is essentially a block of Python code that only runs when it is called.
You can pass parameters into a function as input and a function can return data as output.
In Python, you define a function using the def keyword.
Here is an example of a hello world program using a function test
def test(msg):
print(f'hello {msg}')
test('world')
So this was an example of the fundamental concepts that you should learn at this level
You will never be a good programmer if all that you do is read books or take courses.
You need to practice solving problems so get your hands dirty and start solving simple problems using Python. You can start by solving Project Euler problems.
The reason for that is, this level lays the foundation and the fundamental concepts for not only mastering Python but mastering any other programming language as well.
So even though this is level 0, don’t take it light
Hope you guys enjoyed this post
Comments
Post a Comment