Can anyone explain the last for loop in this code to me? I don't understand. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 13

Can anyone explain the last for loop in this code to me? I don't understand.

https://code.sololearn.com/ccwt8f79LNKL/?ref=app

18th Jul 2018, 8:45 AM
Satyam
34 Answers
+ 1
It is a 2D Array. Each Array in the array represents a row, that should be centered. I will put comments into your prog.
18th Jul 2018, 9:37 AM
Oma Falk
Oma Falk - avatar
+ 7
yes.. I know him.. a bit out of balance in sololearn. But SL is open also for this guys. they are harmless normally.
18th Jul 2018, 12:48 PM
Oma Falk
Oma Falk - avatar
+ 7
... because there are hackers. My main problem are people who think, hacking is a big fun and one can impress other people with it. One will hack his teachers Laptop the other one the traffic system just for fun and being in the news. Hacking always has victims on the other side. car crashes with little children...ohhh i did it just for fun. old people who loose their money.... ohhh but we had a cool party with it violating privacy with mobbing and lifelong suffering of the victim... ohhh yes... but am i not coool and smart? and than it costs money which is not available for other things. That people havent written a handful of progs yet but ask for hacking. so... i stop here... i think you know what i mean.
18th Jul 2018, 1:05 PM
Oma Falk
Oma Falk - avatar
+ 6
i raised my voice against hacking. not what some people want to hear.
18th Jul 2018, 9:58 AM
Oma Falk
Oma Falk - avatar
18th Jul 2018, 9:53 AM
Oma Falk
Oma Falk - avatar
+ 5
i mean white hat hacking is necessary for companies to maintain their security.
18th Jul 2018, 12:50 PM
Satyam
+ 5
white hackers.. yes they are professional. and yes we need them. and we need medicine and people who can create them. But not that guys who ask for the receipt of crystal meth.
18th Jul 2018, 1:15 PM
Oma Falk
Oma Falk - avatar
+ 5
ohh..one last word. Most of them are teens. Well.. if i think right... well.... to be very very honest ... and dont tell anyone.... ... and i wont be missunderstood!!!!.. ... hacking if yet invented.. would have attrackted my attention too in those years ... of cause only ethical hacking...!
18th Jul 2018, 1:52 PM
Oma Falk
Oma Falk - avatar
+ 5
... yes and I was.. .curious for everything forbidden. (-:
18th Jul 2018, 1:58 PM
Oma Falk
Oma Falk - avatar
+ 4
someone keeps downvoting you.
18th Jul 2018, 9:55 AM
Satyam
+ 4
So, you have haters. That's strange!
18th Jul 2018, 10:00 AM
Satyam
+ 4
I really don't have anything to say!
18th Jul 2018, 1:17 PM
Satyam
+ 4
i am a teen.
18th Jul 2018, 1:53 PM
Satyam
+ 4
cool
18th Jul 2018, 1:58 PM
Satyam
+ 4
pretty much.
18th Jul 2018, 2:00 PM
Satyam
+ 3
ok
18th Jul 2018, 9:37 AM
Satyam
+ 3
hackers who do it for fun are certainly bad but without white hat hackers you could expect your data to be with anyone right now.
18th Jul 2018, 1:08 PM
Satyam
+ 3
you were very helpful. Thank you! Right now, I am programming something more on my level of understanding.
18th Jul 2018, 2:01 PM
Satyam
+ 2
It could become clearer, if you print(arr) before the loop. The loop tries to print that array as a triangle.
18th Jul 2018, 9:31 AM
Oma Falk
Oma Falk - avatar
+ 2
Hey Oma Falk! I understand that the list becomes a pascal's triangle. And I understand how the code does it. But I want to know exactly HOW the code turns the list into a triangle.
18th Jul 2018, 9:34 AM
Satyam