All language subtitles for 10. Month Number to Month Name - Solution

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

So let's start writing our program, our monthly program right away, guys.

So let's start with something that we already know how it should be done.

First of all, we know that we have to receive some month value, right.

We are going to let the user insert these value so into the month, the month number.

And that's what the user is going to insert.

So enter the month number.

So in this case, we will read the information from the user and story inside of variable month, and

that's it.

Now, what we have to do is simply to think about what should be the solution.

So what we should do is simply map OK from a given number to some value, write to some representation

of the month, the name of the month.

So if we know that if we received one, then in this case we should bring in January and so on.

Right.

So we simply need something to map.

Of course, we could do it with some basic FLC if and FLC and so on, so, so forth.

But this approach we talked about it in the switch cases section probably is not the best idea.

So what is a better idea is simply to use switch case.

So to switch and we are going to specify the variable that we are going to run in to check all of its

conditions.

So switch month and now we will specify different cases that these variable month can have.

So the first case is case one and by saying case one, this simply means it's kind of analogy to if

month equals to one.

And that's now let's move to the second one.

So case two, OK, so case two, that's the second case.

In this case, we should simply print February, February, write that some application that we were

creating.

OK, and that's OK.

It's not a complex application, but it's a kind of longer than the usual programs that we've written.

But it's kind of nice, right, because we actually get some feeling about the real application.

OK, so suppose that you have to write this really program that gets some number and it's capable of

printing the actual name of the month.

And in this case, let's add also case three and printer for what I think.

OK, so also break.

And there you go again and again and again for all the cases.

So let's simply just copy it and and it's like that.

Like that.

And finally like this.

OK, so.

OK, so now that's simply modified.

OK, it's also OK, the best approach is not to use here or copy paste, but since I know your time

is precious, I decided to take this risk.

So case four is a real and R case five is a case six is June.

Case seven is July.

Case eight.

Where is it.

Case eight is what is it.

August.

Our case, nine years of timber supply timber case 10 is October, case 11 is, what is it, November,

and case 12 is December, the same in her case.

So, yeah, basically, that's it.

Right.

These are all the cases that I wanted to cover.

So it's January, February, March, the date.

OK, so everything seems to be working correctly.

We received some number from the user and we print the corresponding month.

Made our case so awesome.

And last question that remains here is basically what should you do if you receive some number, which

is not in this range, which is not one up to 12, for example, 13 or minus two.

So you also have to treat this case in some way and that's how you do it, in which case of the default.

If it's not, neither are any value from one up to 12, then in this case, simply some error message

here or try again.

I don't know, try again sometime between one to 12.

OK, so that's my recommendation on how you should solve this exercise and basically how you should

apply the default value, the default case.

So the default will be executed only if neither of these cases was executed.

So if one of them was true, that means that the value we received from the user was between one up

to 12.

And in this case we would executed and print the corresponding month name.

But if that's not the case.

OK, so let's say to the user that we got some error and asked him to try again some month between one

to 12, because he probably he or she probably did not use a good some good or a more appropriate number.

So, yeah, this is it for this video.

Let's just build and run in to make sure that everything is working as expected.

So enter the month number on.

Let's go like five.

So it's May and let's go with seven, which is July and let's go with one which is January.

Awesome.

Let's go with some non-trivial number fifteen.

So oh ever try again.

Some months between one to twelve.

And that's awesome.

We also handle this kind of problem.

So yeah guys this is it.

Thank you for your time.

You are now an expert of creating different programs for calendars.

Yeah.

And this is it for this video.

If you still have any questions, feel free to ask them.

My name is Bloodwood Netsky.

This is Alphatech and of course, keep on practicing.

Keep on moving forward with the course and I think you are going to do well.

So until next time.

I'll see you then.

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