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
Welcome back.
In this lecture, I'll show you how to create and run Python scripts.
In picture, a Python script is nothing more than a text file with the dot py extension that contains
python code PI charm is probably the most popular integrated development environment or IDE for python.
It includes great features such as excellent code completion and inspection with advanced debugger and
support for web programming and various frameworks such as Django and Flask will use PI charm throughout
this course.
Let's open picture them and create a project called simply Python Bootcamp.
Using Pi charm is simple.
Basically, you create one or more projects and inside each project you create Python scripts.
These are text files with that PI extension.
A project is a directory in your file system.
My new project will be called Python Bootcamp.
For each project, Chime will create a virtual environment, which is an isolated working environment.
You can leave this option clicked.
Create a main dot pi welcome script or not?
It doesn't matter at all.
It's creating the virtual environment.
After creating the project, I'll right click with the mouse on the project name.
Then new.
In the python file.
And I'll create a file called my script.
If I write my script, it will in fact create a file called my script that by the date by extension
was automatically added.
Before running the script.
I have to wait a few seconds until it finishes indexing the project.
It's almost done.
I am adding a few python statements.
Hello Python world.
And the x equals ten.
There are several options to run a script.
Right click with the mouse everywhere in the Python script and then click on one.
And the name of the script.
So run my script.
And we see the output of the script in the run window.
Or go to run menu and then run in the name of the script.
So run my script.
There is also a shortcut, which is by default the shift F10.
Of course you can change the shortcut or any other aspect of bike charm by going to file in the settings.
Let's go ahead and see how to run only a part of your code.
I'm adding a few lines of code A equals ten and the print eight times two.
B equals 20.
And the print.
B times.
And finally C equals 30 and print c times C.
Of course I can run.
The entire script is I have already shown you.
Let's suppose I don't want to run the entire script, but only these two lines of code.
I just want to test a small part of the script.
How can I do that?
It's really simple.
All I have to do is select the lines I want to run.
Right.
Click anywhere on the selection and then click execute selection in Python.
Cancel.
And only the selected lines of code were run.
Note that there is a shortcut for this alt shift and e.
However, I don't find it handy, so you might want to change it.
Go to file settings and the key map.
And here search for execute selection.
This is the shortcut for that action and you can change it.
By the way, here you can change any other shortcuts.
The basis for running Python scripts using picture.
In the next video, I'll show you how to run Python scripts using the command line.
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.