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
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
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, ladies and gentlemen, and this exercise is going to be a little bit different.
OK, I'm going to I'm not sure that everybody are on this course.
He's basically also a student at the academy.
Maybe yes, maybe no.
But nevertheless, I think that.
Also in school, you've got came across at least one time with these terminology called derivatives.
OK, so that's something I'm going to use here in this exercise to make it a little bit interesting.
Dare really to really deal with derivatives.
Right.
Dear Lou, were rescue teams, yeah, so derivatives and basically some formula that you can calculate
on some equation, let's say, I don't know, we have like a, c, e, C multiplied by X in the power
of an OK, don't freak out.
It's very simple.
And we want to like to find the derivative of this of this kind of formula.
So C is just the constant, X is the variable and and is simply the power of X.
So the derivative can be found without using these formula M multiplied by C, multiplied by X in the
power of M minus one.
OK, so that's very simple.
I'm not going to get into all the details of how it's being calculated.
Maybe, maybe guys you don't remember me because you even not sure that this exercise is for you.
I'm simply I simply thought about it and I know that some of you, at least at least there is there
are enough students here that are in college and they are taking like mathematical courses that they
may also utilize it and implement it there.
But if it sounds like really scary to you, don't bother about it.
You may simply also skip this exercise.
That's not amendatory.
That's all that's just optional.
And just like sort of as a bonus for students that know these derivatives.
So what we need to do is simply to write some basic function that will get these C OK, these constant
that will get the X value, and that will also get like on the the power and.
And once the function will get this power and while the function will have to do is simply to calculate
the derivative and like to use these values that were passed to the function and return the result,
which is the actual value at these current position X.
So it will simply look like this.
So let's say we have I don't know, we have like a scene which is the constant equals to four X equals
to two, which is the actual excoriating that we want to find like the slope value at this coordinate.
And we also know that the graph itself is of a power of three.
OK, so in this case, the function will simply receive these values like four, two and three and and
then the function is going to calculate this value.
OK, so first of all, we know that the derivative is can be calculated, the standard one, OK, can
be calculated just like this.
So and these three multiplied by C, which is four multiplied by the position that we are in currently,
which is two and multiplied by it's not multiplied three.
It's in the power of N minus one, which is three minus one, which is a total of two.
OK, so the final result should be like three multiplied by four and multiplied by four, which will
leave us like three multiplied by four, multiplied by four, which would give us what you give us.
Twelve multiplied by four is forty eight.
Forty eight should be the final value that the function is going to return.
OK, is that clear.
Awesome.
So let's start writing down the code.
So it's derivative and the function is going to receive maybe let's not use amed, maybe let's use floats
to make it more generic.
And so it will be like yeah.
So it will be like simply a suitable for also floating point types.
So we are going to receive like float float C, we are going to receive float X, which is the actual
excoriating aid that we want to find for the slope.
And we are also going to receive like float that power itself, which is represented by M and now we
know like how should we calculate it.
Of course we can go like with this option.
I think that's what we are going to do.
So that's going to be like return, OK, return, return here.
There are also additional options and additional things we can do here.
OK, but yeah, let's let's live it as simple as possible because that's the first time we can also
simply like to take this.
We can take this exercise and we can like readjusted and use here the additional things, but let's
leave it as simple as possible.
So N multiplied by C multiplied by X multiple in the power.
OK, how do you implement power.
How to use power here using clean fluid include the math method, the age.
And when you include math that age you can simply calculate it like I don't know, float power of value.
OK, so it would be like more leverage.
You equals two to what.
To Po OK.
Which is also which is also a what it is what it is guys.
What is Paul doing.
It's taking some base.
OK, in this case we take X, we take X and we know that these power OK, it's going to be in this base
is going to be in some power and these power is going to be M minus one.
So that's exactly what we're doing.
So we return here and multiply by C multiplied by power, value our values.
Yeah.
So that's the exercise.
I think that it didn't go as smoothly as I planned, since I was not sure at the beginning that what
was the level and what was your, you know, like where are you currently in life.
Are you a student at college or you graduated, are you even in school or maybe you're just the developer
who does not.
Yeah, there are some developers that are not well, you very familiar with mathematical expressions,
so, yeah, that was yeah, that was it.
So hopefully for those of you who were interested in like to feel it a little bit, a little bit.
Something from the mathematical sphere.
Here it is.
Yeah.
Let's proceed, guys.
Let's proceed with additional exercises that will probably fit most of the students in this course.
So thank you so much for watching and I'll see you next time.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.