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
hu Hungarian Download
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,960 --> 00:00:07,530 So welcome back to the solution of this amazing exercise where we are going to print these following 2 00:00:07,530 --> 00:00:08,770 nice pattern. 3 00:00:08,790 --> 00:00:10,400 OK, so let's increase it a little bit. 4 00:00:10,920 --> 00:00:17,490 OK, so we have this pattern that we want to print on the screen, on the console application that we 5 00:00:17,490 --> 00:00:18,220 are using. 6 00:00:19,110 --> 00:00:26,670 So in this pattern, what we can see is that it is compromised of ones in stars and one, two, one, 7 00:00:26,670 --> 00:00:27,760 two, three and so on. 8 00:00:28,560 --> 00:00:34,230 So we have to provide here two simple options for printing this pattern in. 9 00:00:34,230 --> 00:00:40,460 The first option is going to be just to use a print off-line for every row. 10 00:00:40,470 --> 00:00:43,100 So we can see here we have five rows, right. 11 00:00:43,110 --> 00:00:44,530 And 10 columns probably. 12 00:00:45,180 --> 00:00:49,030 So we are going to use print off-line for each of these columns. 13 00:00:49,920 --> 00:00:56,090 So first of all, just use F print out and here specify a one in them. 14 00:00:56,130 --> 00:00:59,420 One, two, three, four, five, six, seven, eight, nine. 15 00:00:59,910 --> 00:01:00,700 And that's it. 16 00:01:00,720 --> 00:01:02,760 And don't forget to specify the backslash. 17 00:01:02,760 --> 00:01:09,930 And at the end of these print off-line, then would we have to do simply to use the same line and just 18 00:01:09,930 --> 00:01:13,830 specify one, two, one, two, three, four, five, six, seven, eight. 19 00:01:14,670 --> 00:01:17,400 And again, don't forget to use the best solution. 20 00:01:17,580 --> 00:01:24,540 And of course, the semicolon in the end of this command to specify that we are over with this command 21 00:01:24,540 --> 00:01:27,390 and we are ready to move on for the next one. 22 00:01:28,200 --> 00:01:29,580 So that's how you do it. 23 00:01:29,580 --> 00:01:35,070 And basically what we are going to do now is simply to copy these between the lines, one after the 24 00:01:35,070 --> 00:01:35,440 other. 25 00:01:35,470 --> 00:01:38,490 OK, so let's just align it correctly. 26 00:01:38,490 --> 00:01:39,900 And there you go. 27 00:01:39,900 --> 00:01:48,900 We have five lines, right, because we have a structure of just five lines and 10 columns. 28 00:01:48,900 --> 00:01:52,290 And basically each of the columns is a little bit different. 29 00:01:52,380 --> 00:01:55,320 Each of the rows is in each of the rows. 30 00:01:55,590 --> 00:01:56,420 Sorry about that. 31 00:01:56,700 --> 00:02:00,110 Each of their rows is a little bit different from one another. 32 00:02:00,420 --> 00:02:08,610 So this row has two, three these row have has three, four and three, two, three, four, five. 33 00:02:09,170 --> 00:02:12,090 Basically, that's the whole structure that we have. 34 00:02:12,090 --> 00:02:14,790 That's the rectangle that we are requested to print. 35 00:02:15,750 --> 00:02:21,720 So first of all, let's build and run this program to make sure that it works exactly as we expected. 36 00:02:22,380 --> 00:02:28,500 So as you can see here, it's look, it's looking exactly as we wanted it to look. 37 00:02:29,280 --> 00:02:31,470 And basically, there you go. 38 00:02:31,560 --> 00:02:40,770 One thing that you have also to remember here is that you're requested, first of all, to print some 39 00:02:41,310 --> 00:02:47,220 some, let's say, some shape to the screen that is compromised of a lot of characters. 40 00:02:47,490 --> 00:02:52,060 So you need to understand how to approach and how to tackle these kinds of problems. 41 00:02:52,290 --> 00:02:55,440 It's actually kind of problems for beginners. 42 00:02:55,440 --> 00:02:55,710 Right. 43 00:02:55,710 --> 00:03:00,660 But still, you need to understand how it works, how it looks, how to approach it. 44 00:03:01,950 --> 00:03:08,250 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 45 00:03:08,250 --> 00:03:16,080 Betances, just a bunch of rows and columns and treat each row in a different predefined that will print 46 00:03:16,080 --> 00:03:19,020 first row, second row and so on. 47 00:03:19,740 --> 00:03:22,620 And basically nothing complicated so far. 48 00:03:23,040 --> 00:03:25,830 We've managed to complete it successfully. 49 00:03:26,160 --> 00:03:32,970 And now what I want us to do is simply to use the second option where we are going to use just one print 50 00:03:32,970 --> 00:03:41,600 off-line and to print these are these structure by using just one print off-line and not using five. 51 00:03:42,330 --> 00:03:46,260 So how it can be done, that's also not so complicated. 52 00:03:46,260 --> 00:03:51,960 You know, that this backslash and specifies that you are going to get one line down. 53 00:03:52,110 --> 00:03:52,530 Right. 54 00:03:52,530 --> 00:03:57,290 And once you got one line down, you can simply print the next line. 55 00:03:57,510 --> 00:04:00,610 So that's how you did that. 56 00:04:00,630 --> 00:04:06,990 Now we printed this line and also if you are going to go like this one to three, so instead of using 57 00:04:07,050 --> 00:04:10,410 it in the new line, you're going to print it right here. 58 00:04:10,410 --> 00:04:12,570 And that's not something that we want. 59 00:04:12,930 --> 00:04:17,100 We want to use, of course, a resolution to specify a new line. 60 00:04:17,250 --> 00:04:24,060 And afterwards we are going to simply copy this line to here and this line we are going to copy here. 61 00:04:24,270 --> 00:04:27,360 And finally, the fifth line we are going to copy here. 62 00:04:27,990 --> 00:04:29,930 And basically that's how you do it. 63 00:04:29,940 --> 00:04:34,080 That's how you solve this exercise with just one print off-line. 64 00:04:34,080 --> 00:04:41,160 So let's just make sure that I'm not fooling you around and that everything I said works exactly as 65 00:04:41,160 --> 00:04:42,030 I specified. 66 00:04:42,030 --> 00:04:44,100 So building around it and there you go. 67 00:04:44,100 --> 00:04:53,010 You can see your structure, your rectangle in the same format, in the same shape as you were requested 68 00:04:53,010 --> 00:04:53,810 to make it. 69 00:04:54,360 --> 00:04:57,030 So I think this is it for this video. 70 00:04:57,030 --> 00:04:58,860 Guys, thank you so much for watching. 71 00:04:58,860 --> 00:04:59,940 Keep on practicing. 72 00:05:00,320 --> 00:05:03,680 Keep on moving forward and you are bound to succeed. 73 00:05:03,980 --> 00:05:05,020 I'll see you next time. 6988

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