All language subtitles for 008 Numbers and Math Operators_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

Let's talk about the numbers and math operators in Python.

There are three types of numbers, integers, which are whole numbers flux or floating point numbers

which are positive or negative numbers containing one or more decimals and the complex numbers.

Complex numbers are used in electrical engineering and we want to discuss them in our course.

Instead, we'll focus on integers and floats.

Before going on.

Let's see what an operator is.

An operator is a symbol of the programming language able to operate on various.

There are arithmetic operators, assignment operators, comparison operators, identity operators and

logical operators.

Let's take them one by one.

Or arithmetic operators are used along with numeric values, to perform common mathematical operations.

See the following arithmetic operators.

Addition, subtraction and the division.

For example, print five plus five.

Of course x ten.

This is an addition or a three minus nine.

This is a subtraction.

And the result is minus six and the division eight divided by four.

Note that it returns floating point number even though there is no remainder.

So eight divided by four is two as the float.

There is also the flaw or the integer division which returns an integer.

If there's a reminder, it won't be displayed.

11.

The floor division operator and to.

The quotient will be five and the remainder one which will not be displayed.

So five.

There is also the multiplication.

Double stars is the exponentiation or raising to a power.

For example, let's see the result of two to the power of 100.

And I've got this very big number.

And finally modulus or simply mode.

It returns the remainder of the division of left operand by the right.

Eight.

Mode five.

It will be three because five goes one time in eight and the remainder is three.

And 14 mode four equals two because four goes three times in 14 and there is a remainder of two.

Note that if we use INT and float in a mathematical expression, the result will be a float.

Four times 5.0.

The result will be 20 as a float.

So 20.0.

At the end of this lecture, I'd like to talk about the order of operations.

In mathematics and computer programming, the order of operations or operator Precedence is a collection

of rules that reflects conventions about which operations will be first evaluated.

Exponentiation or raising to a power is at the highest level of precedence.

Multiplication and division are at the lower level of precedence, and the addition and subtraction

are at an even lower level of precedence.

Lexi, an example.

Two plus four.

Pym's.

To the Power of three.

What will be the result of these operations?

Pause the video and think about it for a few seconds.

And the correct answer is 34.

X because the exponentiation has the highest precedence and is evaluated first.

So two to the power of three equals eight.

The multiplication comes next.

And that means four times eight equals 32.

And finally, the addition will have the lowest precedence level.

Two plus 32 equals 34.

If you want to change the order of operations, you use parentheses.

In the next example, I want the addition to be evaluated first and I'll use parentheses.

Now the final result will be six times eight equals 48.

X 48.

You can't use square brackets or curly braces.

Only parentheses if you use curly braces or square brackets instead of parentheses.

You'll get something else.

At the end of this video, I'll show you a trick.

If you have a large numeric value like this one.

It's probably difficult for you to read it.

Is there a million?

10 million, a billion or something else?

Normally you'd use commas or docs to separate every three decimal places.

You'd use commas in the US and the UK, and that's in the other European countries.

In Python.

You can use underscores as visual separators for digit grouping purposes in integers or floating point

numbers.

For readability.

You could write the number like this.

The underscores have no semantic meaning and the numbers are parsed is if the underscores were absent.

X 1,000,001,000.

Equals C equals one underscore 000e to return true.

The underscore in this number has no significance.

We are done with numbers and math operators.

So up next, we are going to have a quick quiz about what you've learned so far.

Good luck with the quiz and I'll see you in the next video where we'll go over all of the assignment

operators.

Bye bye.

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