All language subtitles for 5. Math Functions

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
fr French
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
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

Welcome back.

Let's continue our understanding of int and float.

We talked about the idea of these two data types and how we can use operations on them that we're familiar

with from math class plus a few ones that maybe we haven't seen before such as modulo or the double

slash or the double multiply for the Power of Now.

This is really cool because we can get our computers to do well math for us like a calculator right

but a programming language also provides for us different actions that we can perform.

Now besides these ones we also learned that there's a type action that we can take.

There's a print action that we can take but there's also specific math type functions that enter and

float are able to use that are built into python.

Now these are called well math functions and functions.

Something we'll talk about later on are these actions that we've been talking about remember our diagram

here.

We're starting to learn about the data types and the actions that we can perform on them.

Now in most programming languages these actions are called functions and we have a whole section on

them.

But for now there's some functions that we can use.

So this is a print function.

This is a type function but there's specific math functions such as around and you see right away when

I type Ripple is a tool like an idea that hints and tells us what we can add so says round and give

me a number and maybe an digit.

But let's just worry about the first one for now.

So around if I do three point one and I round here

two.

Well that's not right.

Right.

That's actually the result from up here because we need to also tell it to perform with a function of

print.

Hey print to the screen whatever the result of this is.

And just to make things easier to see I'm going to comment this out.

So I'm just selecting everything and then pressing command slash or if you're on Windows control slash

if I click Run I get three because I'm rounding down the number so let's say it was three point nine

I click and I get four again I'm rounding the number another math function that's built into python

is something called a B S and you see right away that I get a B.S. here and a B.S. returns the absolute

value of the argument and again for those that aren't too familiar with math an absolute value simply

means well no negative numbers.

So an absolute value of negative 20 is 20.

And now because we know about math functions I can start Googling right.

I can say hey I'm a python programmer and I want to learn about math functions well I can go Python

3 math functions and look at that right away.

Google tells me that there is a ton that we can use.

You don't have to memorize all of these.

As a matter of fact some of these I've never ever used in my programming career.

But it's good to know that they have these tools available to you.

And as a programmer this is something that you'll have to get used to the idea that you won't actually

memorize every single action that we can take for each data type because some of these are very rarely

used.

Some of them you'll never use in your career.

The key is to understand how to google them how to find them.

And throughout this course I will show you the important ones that you're going to see over and over

and over but as a way for you to develop as a programmer at least you know that this is how you look

for answers and find out that hey there's different math functions that we can use with numbers.

All right.

Let's take a break and continue in the next video by.

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