0

i m not understanding for range under another for range...please let me know what is the logic behind it.

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

7th Oct 2020, 4:35 PM
#challenger mg
#challenger mg - avatar
2 Answers
+ 6
The technique is called a nested loop. One loop is inside another loop. The outer loop, indexed by i, iterates down the rows of the pattern. The inner loop, indexed by j, iterates across the columns of each row and prints the asterisks '*'. The number of asterisks, as counted by j, depends on the row number in i.
7th Oct 2020, 4:55 PM
Brian
Brian - avatar
+ 2
i - is houses along the street j - is the rooms of each " i " house!
7th Oct 2020, 6:09 PM
Shadoff
Shadoff - avatar