All language subtitles for 4. Print Asterisks Pattern - 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 welcome back to the solution of this amazing exercise where we are going to print these following

nice pattern.

OK, so let's increase it a little bit.

OK, so we have this pattern that we want to print on the screen, on the console application that we

are using.

So in this pattern, what we can see is that it is compromised of ones in stars and one, two, one,

two, three and so on.

So we have to provide here two simple options for printing this pattern in.

The first option is going to be just to use a print off-line for every row.

So we can see here we have five rows, right.

And 10 columns probably.

So we are going to use print off-line for each of these columns.

So first of all, just use F print out and here specify a one in them.

One, two, three, four, five, six, seven, eight, nine.

And that's it.

And don't forget to specify the backslash.

And at the end of these print off-line, then would we have to do simply to use the same line and just

specify one, two, one, two, three, four, five, six, seven, eight.

And again, don't forget to use the best solution.

And of course, the semicolon in the end of this command to specify that we are over with this command

and we are ready to move on for the next one.

So that's how you do it.

And basically what we are going to do now is simply to copy these between the lines, one after the

other.

OK, so let's just align it correctly.

And there you go.

We have five lines, right, because we have a structure of just five lines and 10 columns.

And basically each of the columns is a little bit different.

Each of the rows is in each of the rows.

Sorry about that.

Each of their rows is a little bit different from one another.

So this row has two, three these row have has three, four and three, two, three, four, five.

Basically, that's the whole structure that we have.

That's the rectangle that we are requested to print.

So first of all, let's build and run this program to make sure that it works exactly as we expected.

So as you can see here, it's look, it's looking exactly as we wanted it to look.

And basically, there you go.

One thing that you have also to remember here is that you're requested, first of all, to print some

some, let's say, some shape to the screen that is compromised of a lot of characters.

So you need to understand how to approach and how to tackle these kinds of problems.

It's actually kind of problems for beginners.

Right.

But still, you need to understand how it works, how it looks, how to approach it.

And one of the ways that we said is that let's try to solve it simply by let's look at all of these

Betances, just a bunch of rows and columns and treat each row in a different predefined that will print

first row, second row and so on.

And basically nothing complicated so far.

We've managed to complete it successfully.

And now what I want us to do is simply to use the second option where we are going to use just one print

off-line and to print these are these structure by using just one print off-line and not using five.

So how it can be done, that's also not so complicated.

You know, that this backslash and specifies that you are going to get one line down.

Right.

And once you got one line down, you can simply print the next line.

So that's how you did that.

Now we printed this line and also if you are going to go like this one to three, so instead of using

it in the new line, you're going to print it right here.

And that's not something that we want.

We want to use, of course, a resolution to specify a new line.

And afterwards we are going to simply copy this line to here and this line we are going to copy here.

And finally, the fifth line we are going to copy here.

And basically that's how you do it.

That's how you solve this exercise with just one print off-line.

So let's just make sure that I'm not fooling you around and that everything I said works exactly as

I specified.

So building around it and there you go.

You can see your structure, your rectangle in the same format, in the same shape as you were requested

to make it.

So I think this is it for this video.

Guys, 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.