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
OK.
Ladies and gentlemen, so in this exercise, what we are going to do.
He's simply create an array.
Okay, and let's create an array of size, I don't know.
10.
And Lisa Ray will represent something related to your workout routine.
So let's say you have created a an array of push ups or pull ups, whatever it is.
So let's call it pull ups.
Iraq and we will create a pull-ups array of size 10, and it will basically used to represent and to
store the number of ups we did on the first day, on the second day, on the third day on the 4th and
so on and so forth.
So for example, on the first day we did, I don't know, the three pull-ups.
And then on the next day, we did four on the third day, we need again, three because we were kind
of tired, then we improved to five and then seven eight.
And finally, we reached six nine.
Let's go with nine once again.
So we have like three, six nine.
And finally, at the last day we reached it and not hundred, but to 10 pull.
OK, so some working routine that you have created and every day you wrote down.
The number of pull ups that you've done on these particular day.
All right, so far, so good.
Nothing complicated.
I'm just trying to make this exercise kind of associated to something practical from all scenarios of
working out.
It could be pull ups, push ups, whatever it is.
What's or something like that?
OK, so now what we need to do is basically our program.
We will write it to display this array, this array of values in a reverse order.
OK, so we will print, for example, the number of pull ups we have done today.
Yesterday, two days ago, three days ago, four days ago and so on and so forth five, six, seven,
eight and nine days ago, right?
Because we have 10 days, 10 days starting from today.
So for that, what we will need is basically we know that we are going to use a for loop.
OK.
Because otherwise it won't make sense to write down print f pools or pull up, erase it index nine,
eight, seven and so on.
So since we know how to print array, we will need now to start the index not from a equals to zero,
but rather what do you think?
What should be the AI index?
Think about it for a second.
I should be equal to nine, right, because we have 10 elements and we know that the right most element
starts from index nine.
And we will run this loop until what condition until I is want, for example, greater or equal to zero.
So as long as I is greater or equal to zero, we will go inside of these for loop buddy.
And on every iteration, we will do a minus minus two degree meant the value of I by one.
So once again, what we want to do here is basically to iterate over all of these array of pull ups
and print the number of pull ups we have done starting from today up until 10 days ago or nine days
ago in this case.
So that's why we need to specify this index should start from nine.
So in this case, we would do print f number of pull ups equals two percentage D.
And then we will print pull up sarray pull ups and array at Index I.
All right, is it clear now let's run this program and see what happens?
So there you go.
You can see number of pull ups equals to 10, number of bill of six or two, nine and so on and so forth.
OK, so that's one option to solve this exercise.
Another option, basically, instead of initializing it, we could have created this array and we could
have said, OK, so let's ask the user, OK, let's do another for a loop starting from equals to zero
ice less than 10 I + + and ask the user to something like that.
High.
Or let's go like this.
Enter number of pull ups.
On day.
Percentage the.
Right.
And in this case, instead of percentage, they will use I +1.
OK, so it will be on day one, on day two and so on and so forth, and we will read these information
and storied inside percentage rate using the percentage de placeholder pull ups are rate at index I.
That's it.
And then we'll print the information.
I'm just practicing with you a little bit of all of this info, so we will be able to print number of
pull-ups equals two, OK, and we'll say that.
One day, let's see.
Um, percentage D..
Days ago.
Days ago, you did.
Percentage de pull-ups.
OK.
So here we will specify, I write or better, I say we will specify 10 minus say, is it correct?
10 minus I minus what?
Minus one.
Exactly.
So what we want to do is zero days ago, which means today you did.
Some number of pull ups, if we will reach the next iteration, when we reach the next iteration, I
will be equal to one.
So we will print out Tim.
I will be equal to eight 10 minus eight minus one.
It will be once a one days ago you did percentage the pull ups and so on and so forth.
So let me show you what it will look like.
So we created this kind of program.
Enter a number of pull ups on day one, let's say.
What was it?
I don't remember five three one two nine six five five four three and let's go seven.
And finally, Tim.
So now what we can see that zero days ago, which means today you need 10 pull ups, one days ago you
did seven pull ups.
It is the index of the Ninth Element in disarray and so on and so forth.
So you were able in this exercise to what you were able to print were a display.
Display the array.
Values in a reverse order.
Is it clear?
If you have any questions, feel free to ask, my name is Vlad Lisas, Alfa Tech.
Thank you so much for watching.
Keep on practicing.
Keep on moving forward and you are bound to succeed.
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.