L9 Part 2 Using Python IDLE for writing python code | Python 3 programming

L9 Part 2 Using Python IDLE for writing python code | Python 3 programming


have you heard of Python IDLE ? how to
write Python code in Python IDLE? watch out the video till end to know in
details about Python IDLE and how to write programs in IDLE if you are new
to this channel then please subscribe the channel so that you get all updates
about our future videos once they are released and also hit the like button it
gives us a motivation to do more hello everyone and welcome back to a ipython
in our last video we have seen writing your first ever Python code in CLI that
is command line interface in case you have missed our last video then click on
the I button at the top right corner of this video to get more information in
this tutorial we are going to understand how to use Python built in IDE which is
known as IDLE it stands for integrated development and learning environment to
write your Python code so python IDL is basically in Python environment where
you can write programs in the last video you have seen how to write programs
using command-line interface now in this video we’ll see how to write the similar
kind of code in Python ideally so for your information Python IDLE is by
default available with the Python installations of when you install Python
you don’t have to separately install python IDLE as it is already
available with your installation so you can start python IDLE by pressing the
window key in this and the search box write IDLE you’ll get ideally python
depends on the version mostly it will be three point something so you can click
on it and the python IDLE will be opened for you
so in this environment we can write similar code as we wrote in python
command line interface for example you can write seven plus six you’ll get the
result so this is interactive so one advantage from command line interface is
here you can write your code in an interactive way as well as in the
comprehensive way so don’t confuse with interactive and comprehensive in entire
if we will write a sentence write a command and it will give the output
whereas in comprehensive will write two or three sentences two or more sentences
so from now onwards once you started knowing the Python program you don’t
have to work on this command-line interface because this is for small
small programs just to take help or maybe to write a single sentence or
maybe to check out the functions for all these purposes so from now onward we’ll
write program using Python editor so you can open Python editor by going to file
and then open click on new file so this new file will open so here you can write
your program big program small program whatever kind of program you want to
write we’ll see through it how we can write first comprehensive program so
here we can write for example print I’m sorry my keyboard is little bit sluggish
so we’ll write so here we wrote this one line single line it is similar to the
command line interface or the previous we have seen invention of this editor is
not to write a single line of program although we can run this program so
we’ll see how to run this program so we’ll go down the file go on file click
save and it’ll ask where location give it desktop and then right you can give
test and then dot P Y here py is very important because when you try to save a
Python program you have to give an extension of dot P Y so py is very
important it will tell the compiler that this is a Python program or specifically
to the computer you can it can say circum python program so we’ll save it
and then we have an option called run here we can run the python module using
run module f5 so it will go again into the interpreter so that we have seen
earlier and it will invoke this command and it will give you the result print
hello everyone welcome to Python ok we have seen we don’t need to close because
every time we’ll run this program using text editor it will call this
Python interpreter so now we are going to add few more lines of code here we
can also write maybe two plus two but it won’t give the result if you try to run
this program let’s say file and then save you can go to run and then run
module so shortcut is f5 you can run the module and you can check only hello
everyone welcome to Python is printed not these two lines why because this is
not you are not in Python interpreter mode you can in simple word you can
understand this is your input and this is your output so I’ll put it
towards the right side so you can understand so this is your input and
this is your output this is where you write your input and the output will be
displayed in this window okay but now if you want to really print this value so
we can use the function print and then 2+2 this is a function which will add
this number and display value you want to check just check it out
save and then run fi it’ll give you the result for okay so you have another
options another option like you can print text also we’ll see the print
function in more details but for this tutorial just understand we can write
text as well as number so how will write text just see we will write sum sum is
two plus two okay then we can save it and then we’ll run you see I’m sorry you
have to put comma because this is the string and this is the print function I
will tell you in detail don’t worry about it J write your text in your
double quotation and then put comma and write any numerical calculation you want
file save and then run module run module so it will give sum is 4 similarly you
can also write print result is maybe you want to subtract 8
minus 3 you can see so we’ll write a couple more lines and then we’ll print
out the result together so we can write this is this is complex number 7 plus 5
J sorry J sorry I forgot to put comma now you have pretty much all the
information like four lines you are printing so we’ll save the file and then
run so you’ll see the result hello everyone the first line is executed the
second line sum is 4 the third line result is 5 and in the fourth line it is
this is complex number 7 plus 5 J so you know about this addition multiplication
and complex number in case you have missed the video please watch the last
video the information is available in the description as well as in the I
button the starting of this video we’ll use this editor a little bit in our next
tutorials don’t confuse if you don’t know about how to write program because
this is just a beginning we are just writing the basic very basics of Python
it cannot go below this trust me this is the basic of Python so Python ideally is basically an
integrated environment that you can say a Python has given by default editor for
writing your code there are countless editor available in
the market so this is this one is default Python interpreter which is
available without installing any additional packages so you if you
install Python this will be available so this is by default from the Python site
if you want to check the details let’s say we’ll go to help section and
understand what is about ideally so ideal is basically an integrated
development and learning environment this is from Python Python version for
this ideal is three point seven point four and TK TK is tkinter this is a
toolkit using which this Python editor has been made that Python IDL II has
been developed so you can check all the license copyright credit and ID le
version is also three point seven point four since it was released for Python
three point seven point four so if you want to go through the menu you can go
file these are the options you can mostly you’ll use save and open and all
and then go to editor you can if you write a big line of code you can find a
specific item you can find line number also you can go to specific lines as we
will use we will see how to use all these functions cell you can use to
restart like you want to restore the cell for example you write something
five plus six you want to clear the window similar to CLS command here there
is a default called restart cell so you can restart the cell and again restart
the cell all of a new and in the debug option the debugger is also very useful
when you write a program you want to debug it at what point of it at which
place I’m having trouble you can use this debugger to use this so don’t worry
about it if you are confusing with all these details this this is just I am
showing you for the initial understanding of what Python IDL is in
the beginning you won’t understand everything as we go through and write
more programs will understand more functions so don’t worry about it so
that’s it for today in case if you have any problem please write your queries in
the comment section we would love to answer your queries and please subscribe
our channel so that do you get latest update about our next
videos thank you so much and see you guys in the next lecture have a good day
thank you so much for watching this video we’ll keep on adding the content
so please like comment and subscribe thank you

3 thoughts on “L9 Part 2 Using Python IDLE for writing python code | Python 3 programming

Leave a Reply

Your email address will not be published. Required fields are marked *