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
All right, what is going on, ladies and gentlemen, my name is Vlad.
This is Alpha Tech Academy and we are proceeding with additional exercises in our programming course.
So this video and this exercise, what we are going what you are basically required to do is to write
a function that gets some number of an integer type and a digit.
OK, and these function that you are going to write has to do two things, OK?
The function should.
So let's say the function should know.
Let's specify what exactly each should do.
One, two.
So the function, first of all, should find out how many numbers, OK, how many?
No, let's see how many digits.
OK are less than the specified digit.
So when we are given with this number, OK with this num value and this value can be of one digit to
the five digits, seven digits and so on.
And we are interested in finding out how many digits inside of these naoum value are basically less
than these digits that was specified as the second argument for these function.
So we will need to Lizzi print.
OK, the total amount, total amount of digits in normal that are which are less than digits.
OK, is that clear so far?
And also what will will have to do is to return.
OK, we are going once again to discuss the differences between these two formulations or I don't know,
terminologies, whatever you call it.
The function should return the average the average of those digits.
OK, the average of the values of these digits that are that are less than digits.
OK, so let's see a couple of examples.
Let's say that we have, I don't know, example number one.
And then we have example number two.
So at example number one, what we have is something like this, I don't know, let's say we have a
number like one three, five and seven, OK, and one three five seven two.
That's the number that what number equals two.
So now equals to this one and digit equals two.
I don't know.
Let's see three.
And in this case we know that if we take a look, if we take a look at this number, we will see that
one is less than three.
Three is not less than three, five seven and two is less than three.
So we know that one and two are less than these value three.
So the function should print.
It should print the amount of digits, the amount of digits, which are less than digits itself.
Then in this case, we should print just two because we have two digits, less than three.
And then the value of these three major and also what these function should do is to return the average.
So if we know that one and two are basically the values that interest us, then in this case we should
return one plus two divided by two.
Right.
That's basically what should what we should return.
And in this case, it's going simply to be like to return turn one and a half.
OK, so that's basically what this function is all going to do.
If we take another example, I don't know.
Nomikos to one, two, three, one, two, three.
And digit equals digit equals to, I don't know, three once again.
Then in this case, the function is going to print what he's going to print.
One, two, one, two, four four is the total amount of digits, less than the digit three.
And the function is going to return average and its average is going to be one plus two plus one plus
two is six divided by four.
In this case, that's just what happened.
The function is also going to return one and a half.
So I hope the instructions for this exercise are basically clear.
Do you think about the signature of the of the function as well as one this function gets where it should
it print the values we are or should it return?
OK, make the distinguish and basically understand the differences between printing and returning something.
OK, I think we talked about it pretty pretty much enough.
So, yeah, so that's about these function.
Try to do your best, guys, give it a try on your own, and of course, we'll solve this exercise together
right away once you are done in our solutions.
So if you have any questions, feel free to ask them.
And until the solutions, I'll see you that.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.