All language subtitles for 001 Variables_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Hey, guys.

And welcome back.

In this section, we'll be focusing on some key concepts of Python programming.

Variables, comments built in data types and operators.

Let's start off with variables.

What is a variable?

How to declare a variable and how to use variables in Python.

A variable is one of the fundamental concepts of any programming language.

We use variables to store the data.

The application is working with a variable is nothing more than a label or a name for a memory.

Location where a value which can be manipulated is stored.

To be more concise, I'd like to give you a simple example.

Let's suppose you develop a simple script that converts miles to kilometers.

When running the script, it will ask for the number of miles.

Then the user will enter a value, let's say ten, and the script will give the corresponding value

in kilometers, which is 16.9.

By the way, one mile equals 1.69 kilometers.

The value ten entered by the user.

Will be saved by the program in a variable somewhere in the memory.

To be more precise, in the RAM memory.

All variables are saved in RAM memory.

So we can define a variable is a name for a memory, location or address that stores the value.

In our example, then a variable has a name and is the variable word implies the value stored in it

can be changed.

I'm creating a new Python script in picture.

In Python, you can simply create a new variable by typing the variable name, the equal sign in the

value that will be stored in the variable.

For example, miles equals ten.

This creates a variable named Miles that stores the value ten.

The variable was created the moment you first assigned a value to it.

Now, if you want to modify the value stored in the miles variable, you write miles the equal sign

and the new value, for example, 15.

We won't go into details now, but we'll have a long discussion about immutable and immutable variables,

which means what happens with the variable when we change the value stored in it.

You can also declare multiple variables on a single line like this one comma, B, comma C equals one,

comma two, comma three.

And I'm printing a B.

SC.

By the way, print is a python function used to display messages onto the screen.

You give it a variable or a message as an argument, and the function will display it on the screen.

And I'm running the script.

You can see the values of A, B, and C or H, Co my name equals.

30 comic John.

John in single quotes.

I've created two variables a variable called edge that stores the integer value of 30 and another variable

called name that stores a string or a sequence of characters with the value of John.

By the way, if you add one or more species at the beginning of the line before the variable name,

you will get a syntax error.

This is a syntax error because I added a whitespace.

Indentation is part of the syntax in Python and all instructions belonging to the same block of code

should have the same indentation.

Indentation refers to the spaces at the beginning of a code line.

I'm removing the white space.

Often you will see terms as defining a variable, declaring a variable or initializing a variable.

In other programming languages, for example, in C or C++, there is a very clear distinction between

declaring and defining a variable.

The clearing means introducing a new name and type, for example, in miles.

Which means a new variable called Miles will be created and it will store an integer value.

And the defining means allocating a value to that variable.

For example, miles equals ten.

By the way, this is not valid Python code.

In Python.

We don't have such a distinction because we don't explicitly specify the type of data the variable will

store.

A variable is also sometimes simply called a name and can store any type of value, a whole number or

integer, a floating point number, or simply a float or a sequence of characters or a string, a list,

a reference to a file, and so on.

Och, we are done for the moment.

In this video we've learned what a variable is and how to declare a variable in Python.

We'll take a short break and in the next video we'll go over naming conventions for variables.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.