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
What is going on, guys?
And welcome back to another exercise in our programming course.
In this video, we are going to talk again about loops and how we can use them in order to utilize and
to create different patterns and to prevent different shapes to the screen.
So get yourself ready and let's go.
And what we have to do in this exercise is simply to write a program that receives an integer, which
will be the variable.
It's a variable in and in this exercise, we should print a pyramid of numbers with the following pattern.
So basically it should look like this.
We should start by specifying the number of rows.
OK, this will be the number, number of rows.
OK, the number of rows.
And once we specify the number of rows, we should print the following pattern.
So starting from one end on the second row, we will have two values.
So in the first row, one value on the second row to value two values on the third row, three values
and so on and so forth.
So basically, starting with just this pattern from one in incrementing each value from the left to
divide by one once again.
So one, two, three, four or five, six.
And also this should be printed like make sure you don't print it like this.
So one, two, three, four, five, six, because this will be just the right angle triangle.
And we I think we already talked about how to print this kind of shape, but rather, what do we have
to do is simply to print it like these this pattern of triangle.
So basically what you should think about is how you can know in advance what will be the number of spaces
in each row.
OK, so think about it, maybe two.
That's this will be just one space and so on.
And also how you increment the value.
If these were just stories you, you know, we could have printed like this.
So that's not a problem.
We already have done something similar to this exercise, but now we want to print the numbers in some
incrementing order.
So from one to six, or if we take a look, if we have rows equals two rows equals to four, then in
this case.
Sorry about that.
Let me just erase it.
Rows equals to where is it?
Where is the mouse.
OK, rows equals to four.
In this case, what we should print is once again on in the first line we should print something like
adjust the value of one, two, three, four or five, six, seven, eight, 10, nine.
OK, simply incrementing and in every line printing the exact number of values based on the line itself.
So line number one, that one value line number two, two values and so on and so forth.
So do a couple of minutes, think about the solution, try writing it down on your own in your ID and
of course we are going to solve it together in the next video.
So until then, good luck.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.