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
Okey, dokey.
So in this exercise, what you are required to do is to develop a recursive function that receives an
integer numb.
OK, so probably the signature of the function is going to include enum.
OK, now is the name of the variable end is the type of the variable.
And also these function is going to receive not only numb, but also these function is going to receive
a digit.
OK, so function is going to receive two things.
One is numb and two is digit.
And this digit should represent basically any value between zero up to nine.
OK, so zero one two three four five six seven eight nine.
And the non variable can be basically whatever name you can think about.
It can be of one digit to the digits, three digits and even seven digits.
All right.
So that's basically about what the function receives.
But why aren't these recursive functions should do?
All it has to do is that these functions should return to options.
It can return either a zero or one.
That's it.
Only two options.
The function is going to return one if the count of digit occurrences in NAM is even meaning if we have.
We are basically going to go over each digit in our name and compare it with the actual digit that we
received.
And if the total count of digit occurrences in NAM will be even, then this function is going to return
one.
Otherwise, the function is going to return zero.
Meaning if the number of digit occurrences in NAM itself is odd, then the function is going to return
zero.
So, for example, let's take a look at basic examples like this one.
If we have no equals to twenty 124 and we have digit equals to two.
OK, so now equals to one hundred and twenty four digit equals to two.
That's one of the function received, and we are going to count how many times digit appears inside
of these number.
Digit number equals to two.
In this case, we know that digit appears only once.
So that means number or a total count of occurrences equals to one.
That means it's an odd value.
And that's why the function is expected to return the value of zero.
Also, if we have another name, let's say, one two, three, four two and the digit equals again to
two.
Then we count how many times we have the how many occurrences of the digit we have inside of NAM, and
we see that there is the first time in there is the second time, meaning a total of two times.
That means that the function has two occurrences of the digits inside number.
That's why two occurrences is an even number of occurrences.
That's why the function is going to return one and also the same here.
If we get the digit of zero and we see like one, two, three and four times the digit four occurrences
even.
And that's why we return one.
So these are the instructions to develop a recursive function.
Make sure you're not used the interactive approach of using loops for loops while loops don't use it.
Probably because we need to develop a recursive function that will work with the recursion concept.
OK, so with that being said, now is your time.
Now is your turn to try and develop the use function on your own.
And until the solutions VIDEO Keep on practicing, practice this, get better and become the best programmers
you can be until the next time.
My name is Vlad Lisa's alphabet.
I'll see you in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.