Yeah, we have successfully set up Python and also as we are able to launch Python using PowerShell,
let's spend some time in understanding how to use Python to learn Python.
The way you can start learning python using python is by going to the PowerShell.
Once you are in the PowerShell you should be able to type python.
It will launch Python.
Once Python is launched you should be able to start learning Python.
For example.
Let's say you wanted to understand how to print a string.
You can pass a string to a function called as print.
Like this string can be passed in single quotes or double quotes.
So when it comes to Python, once you specify the statement, you should be able to hit enter.
It will take care of executing whatever is there in this statement.
Now, if you want to understand how to perform arithmetic operations in Python, you can go ahead and
practice using Python.
Let's say we would like to create two variables A and B with ten and 20 respectively.
And we might want to perform addition operation between the two variables and assign it to a variable
called as or result.
Then we might want to print the rest of our result variable to see what is the sum of A and b.
The way you can learn arithmetic operations using Python is like this.
You can define a variable by name A then equal to ten.
Ten is a constant.
A is a variable.
Now let me define another variable by name.
B, let me say B equal to 20.
Now we have two variables.
We should be able to perform arithmetic operation like this.
You can see that A plus B have returned 30.
In case if you wanted to assign the sum of A and B to a new variable called as rest, you can say rest
equal to, then you can say A plus B and hit enter.
Now rest will be having 30.
You can validate by saying rest in case.
If you want to print, you can say print of rest like this.
You can see it has returned 30.
This is how you should be able to use Python to learn python.
However, it can be counterproductive when you try to develop functions and start using those functions
using Python, it comes handy to explore the APIs and functions to get help to start using as part of
our applications.
But learning Python using Python is not recommended.
Don't worry too much if you do not understand the concept of variable, literal or constant performing
arithmetic operations.
At this juncture, I'm trying to highlight that you will be able to learn python using Python.
However, it is not very productive approach.
It is better to use ides either.
You can use notebook based ides such as Jupiter or full blown AIDS such as Visual Studio, Code, PyCharm,
etcetera.
To actually learn Python.
As I have gone through some of the details with respect to learning Python using CLI and also as I have
mentioned, it is counterproductive to learn Python using CLI as I am recommending to use IDES.
Let's go ahead and understand how to make sure Python can be integrated with VS code.
Once Python is integrated with vs code we should be able to learn Python a lot more effectively using
vs code.
I'll be talking about integrating python with vs code so that we can use vs code to learn python as
part of the next lecture.