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, so now let's take a look at how it can be done in our programming language.
So first of all, let's start with all the formality.
Just include everything that you need, then create the main function in Maine.
Open up the curly brackets.
And now let's create a variable that should hold the value of your grade.
So just use it.
Great.
All right.
We all assume that in this example, grade is going to be of an integer type.
Then we are going to read the grade from the user by using the scanner function.
But before that, we are going to print just some guiding message to show the user what we want him
to do.
So print F and enter your grade.
Then we have the scanner function that takes an integer value from the console and put it inside of
the grade variable.
Now we want to check if the grade is real good.
For example, if it is 80 or higher, like we've seen the previous example.
So we just use the condition, the youth condition.
If grade is greater or equals to 80.
And if that's the case, if that's the case, we should print an excellent job message.
So we just go with the print F.
Excellent job.
Backslash.
And at the end of it and we are done with this result.
If the result is true, then the message is an excellent job printed to the screen.
Otherwise mean give the grade is less than 80.
We know that there are two messages that may be printed.
All right.
So the first one would be if the grade is less than 80.
But still, we want to check if it's above 60.
If it's 60 or higher.
Right.
So for that, we're going to use another if statement and master if and check out another condition
if graded equals or greater than 60.
So we have the result for this condition happens to be true.
That means that the grade is somewhere between 60 to 80.
Right.
It's pretty much in this range, which is still okay for our exam.
And if that's the case, we're going to print not bad message to the screen.
But if the result for this condition happens also to be false, then we can say that you failed the
test and you got less than 60.
So we use the title at the last.
Else, let's call it this way.
And what message should we print in this case?
And in this case, we should simply use a no.
You didn't pass the exam and try your best next time.
All right.
Just pretty much a failed.
Try again message.
So this line, these last print f command will only be executed if the grade is not equal or greater
than 60, as well as if it's not greater error or equals to 60 to 80 and to 60, I'm sorry, to 80 and
to 60.
Meaning that this line, these last print F command is going only to be executed if the grade is less
than 60.
And the second print F command, where we can see that a not bad message is printed out of the screen,
is going to be executed when the grade is in the range between 60 to 80.
And the first message is only if you studied well for your exam and you got a grade that is 80 or higher.
All right.
So I hope that makes sense to you.
All this structure, all of this usage of nested if conditions.
And lastly, what I want you to do for this exercise, for these video bitterer say, is that I want
you I would like you to give it a try to solve the above example on your own.
All right.
Just let yourself feel the coding process.
Check out if you've got any errors.
Try to fix them, try to fix them on your own computer.
And the results with what you can see right now on the screen.
But this process, this process of learning, and it's basically will sharpen your skills in programming.
And you need it.
So make sure to check that out.
Give it a shot on your own.
And I'll see you in the next video, guys.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.