Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Hi, and welcome back.
In this video, I'll show you how to run or execute Python code using the interpreter.
There are several ways.
And we'll take a look at each of them.
If you want to test some basic concepts or execute just a few Python instructions.
You can write an execute them directly in the python interpreter.
Here you have two options.
The first option is to open the interpreter from the Windows Command line or cmd dot TCS and write all
the Python instructions there.
Even if this works perfectly, it isn't the recommended way, or at least not for beginners.
That's because it lacks the advanced features like auto completion or a color highlighting of key words
or errors.
It will be harder for you to write your code here.
However, this is how it's done.
Go to start type CMD and hit enter.
Now I'll write the python and press the enter key.
The python interpreter has just started.
Here we can execute Python instructions.
The second option to execute Python code using the python interpreter is to use idle, which stands
for Integrated Development and Learning Environment.
On Windows Idol comes by default with the Python installation, so it's already there.
To open idol just type idol in the Windows Linux or Mac Start menu.
And you'll see something like this.
This is a python shell or interpreter where you can write and execute short scripts and see their output
immediately in real time.
Each line starts with a three greater than size.
This is the ideal command prompt.
Throughout this course, when we say three greater than size will know that the code has been executed
in Python idle.
Let's write something very simple.
Print and the Hello Python in parentheses and double quotes.
Now let's do something else.
X equals six x times two.
What have I done?
I've just declared a variable called X that is equal to six and then printed out x times two.
In Python idle.
It's not necessary to use the print function to see the value of a variable.
You can just type its name and hit enter.
We won't focus right now on variables or other Python programming concepts.
We'll have a lot of time for that in the next lecture.
For the moment, I just want to show you how to execute Python statements in idle.
If you want to execute a statement again, you simply go with the arrow keys to that line and press
the enter key.
And we can see how that statement has been copied on the last line.
I can modify it and run it again if I want.
Another useful feature is the autocomplete or word completion.
The application will predict the rest of the world a user is typing.
This time I'll declare another variable that stores a string, which is a sequence of characters name
equals and between double quotes.
Andre.
And then I'll write the name and the date.
And I'll wait.
Idle will open up a pop up window with all the methods and attributes available to the string objects.
Let me say it again for the moment.
Don't focus on the language, but only on Python idle.
You can change the completion, pop up, wait time by going to options, configure idle and the windows.
Shares the completion of pop up wait time, which is given in milliseconds.
Other options like the font size can be changed in this window to.
Also keep in mind that you can run many simultaneous sessions of Idol as you want without one interfering
with the other.
I'm opening another idle session.
They are completely separated working environments.
In our course we use idle only for small tasks and examples for complex scripts Picture, which is probably
the most used professional python ID will be our choice.
I'll show you how to run your scripts in picture in the next video.
I'll see you soon.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.