Hello everybody and welcome back to this tutorial. And right now let us take a
closer look at the interactive development environment for Python 3, or
also known as IDLE. Now we downloaded everything we need for all our platforms
such as Windows, Linux and Mac OS, and right now in order to start the actual
IDLE, or the Python 3 interpreter, just type in python3, if you are using
Linux. And just go to the start button, type idle, and navigate to
the idle Python 3.7 version, whether it is 32-bit or 64-bit. Now I have multiple
versions installed right here, that's why I have this many, so we'll just go
with the newest version of the 64-bit
Python 3. You can see they are rather the same on both of these Linux and Windows
systems. And what idle or the interaction development environment is, is, basically,
it is used to help us with the errors, most likely. Now let's imagine you are
writing a program in some text editor, or in Visual Studio, or wherever you
actually want to write the program, so, for example, let's just say you're writing it
in the notepad. And you write a bunch of lines of code,
tens and tens of pages, and then you don't know you get an error and you
don't know what where that error is, or what the problem with that error is. What
this Python 3 interactive development environment or the IDLE
allows us to do is simply just execute a single line at the time. Then we
can actually see whether there is a problem with that single line, such as if
we type right here print and open and close brackets. Now the print function
will basically just print what we type in the brackets themselves on the
screen. So, you need to open the quotes, so I'll open it right here. Let me just find
where the quotes are, okay, and then you can just type your hello. As you can see,
if you use that function print('hello') between the single quotes, it will just
print hello to the screen. And there you know that this function actually works,
and that the syntax for this function is correct.
But if you, for example, type print and then open it both brackets, add the
single quotes, or add one quote and type hello, and forget the next quote and type
enter, you can see EOL while scanning string literal. Now syntax error
basically means that you coded something wrong in the program, and what is Python
3 interpreter allows us to do is to notice where that error is. Now you might notice
that this error actually doesn't give us too much detail, sometimes these
errors can actually be a little bit complicated, but right here we know that
we forgot to add the actual single quote. Now I will explain everything, why we're
adding single quotes, what this print function is, but for now let us
just see what this IDLE interactive development environment is. So you most
likely will, while you're coding, have both of these open, such as notepad or any
other text editor to write the program, and also have the Python 3 interpreter in
order to test a single line in order to see whether the syntax is correct,
so you don't have to actually find the errors in the entire program itself. So
in order to open IDLE you can just go to the start menu, type idle
and open the IDLE for version you want to. On Mac OS you open the idle by going
to the windows finder, or you can open windows finder, click on applications, and
then python 3, and then on the idle. In the actual Ubuntu you can either type it
like this, just type in your terminal python3, or I believe, let me just check
out right here. If you go to the application accessories, okay, so let me
just see show applications. Okay, let me just check something out. If I just go
back right here, open this, let me exit it to see whether we can actually
open it with the idle3 command. idle3 not found, did you mean idle? OK, so let us
try with the idle itself, and here it is. You can either run it like this which
will look exactly the same like this one, or you can run it from the Python 3, or
pardon me from the terminal, as Python 3. That is on you. So, that is basically it
about IDLE. We are going to continue coding in the next lecture. For now on we
got some of the basics, such as downloading Python, navigating to
the Python directories, basically, interacting with the IDLE
itself. And right now we're good to go and we should be able to start coding. So
hope you enjoyed this tutorial and I hope I see you in the next lecture. Bye!