The interpreter works in two modes one is the interactive mode and the other.
Script mode in the interactive more.
The interpreter gives immediate feedback for each statement.
It also stores the output of previously executed statements in active memory as we enter a new statement
or as a new statement get executed.
The entire sequence of previously executed statement is considered while evaluating the current output.
So what do we mean by this.
Say for example if not i d e v and build the first statement I assign value to to the variable e and
run the interpreter.
The interpreter draws the output of the Executed statement in active memory and then in the second line
I assign the value three to the variable B and then drown the interpreter.
Again next in the third line I give a variable and see which and debatable is a and b and run the interpreter
again now using the print function.
I would like to display the value of the variable C
as new statement that executed by the Python interpreter.
The entire sequence or previously executed statement is considered by evaluating the current output.
And the interactive mode is a good way to play around and try variations on syntax coming to the script
mode.
This script more we give Python of I love Jade Mint and the interpreter interpret all of the statements
in that script.
Interactive mode is great for testing small chunks of code but there is one problem.
These statements you enter into Python no I.D. e are not saved anywhere in case you want to execute
the same set of statements multiple times.
You would be better off to save the entire code in a file.
Then use the Python interpreter and script more to execute the code from a fine now in order to understand
the interactive script mons let's go to the pythons.
Ideally you haven't installed Python or any other I.D. yet.
We will talk about the anacondas Jupiter notebook shortly so do not worry.
But for now let's go to Ida any on the windows system.
Go to the start menu and search for it.
Ideally in case of macros go to the terminal window and then type ideally.
So here is the python so I D E.
The three are all signs that you see here is called the python prompt which means python is ready to
read in a new command by giving us that visual to also.
It's the python way of telling us that we are in the interactive mode so let's print out some text using
the print function say hello world
then hit enter as soon as I hit enter the interpreter.
Execute this particular audio statement.
Now the ideally can also be used as a calculator.
Say for example I want to add the numbers these three numbers.
So the interpreter has added all the three numbers and given as an output immediately.
So this is the interactive mode.
The other mode that we have talked about is the script mode or the normal mode.
And for that you need to put all your statements in a file so then go to the fight and then see you
fight and you.
I'm willing to give a print function
and put in scrap more.
Multiply two numbers 20 multiplied by seven then do a division 34.
Divide by nine of them and we will save this by to save your playing mode.
This code text Daud.
B Why is the extension C now in order to execute this fine at the top.
Choose the run and go to run module I have three statements in.
Define these are the three statements.
I have three statements in the file that I see but I only see the first statement has been output by
the interpreter in the script more that because in the script more in order to display any text or any
statement or expression any value in the script mode.
If you want to display something we need to use the print function this is not required in case or for
the python's interactive mode.
So now let's go to the same light and use the print function to do the math calculations and you need
to see your filing in and then execute
now.
Now you have all of the statements in the file executed.
So this is about to the into the interpreters mode interactive and script more.