Got a Question on this topic? Let us know in the comment section below 👇 and we'll have our experts answer it for you.
@nimaanmi5 ай бұрын
I always had this issue as to why we did x in soandso and y in x within a nested for loop.. I hope the college books had fruits and then y in fruits as example,, this makes it more simple to understand. ❤
@joshwzr12572 жыл бұрын
Thanks a lot sir. I previously tried to understand nested loops but was yet giving up on them until I landed on your explanation. You deserve a sub, as I have done so.
@SimplilearnOfficial2 жыл бұрын
You are most welcome
@michaelmaklan39622 жыл бұрын
I dont understand what does print (end=" ") do. And I dont understand why do we need to print an empty brackets at some of the examples? Would you please explain. Thank you
@lilyarman3 жыл бұрын
Very clear and brilliant presentation. Thanks
@SimplilearnOfficial2 жыл бұрын
Glad it was helpful!
@megalas683 Жыл бұрын
Sir using while loops for both outer and inner the inner loop condition is i >j which means 11 >11 how the condition works in that part ?
@SimplilearnOfficial Жыл бұрын
"In a nested while loop, you have an outer loop and an inner loop. The inner loop is executed repeatedly for each iteration of the outer loop. Let's say the outer loop has a counter variable i that starts at 11 and is decremented by 1 each time the loop runs. The inner loop has a counter variable j that also starts at 11 and is decremented by 1 each time the inner loop runs. The condition i > j in the inner loop means that the loop will continue to run as long as i is greater than j. In the first iteration of the outer loop, i is equal to 11, so the inner loop will run as long as j is less than or equal to 11. In the first iteration of the inner loop, j is also equal to 11, so the loop will run at least once. As the outer loop continues to iterate, i is decremented, and the inner loop will run for fewer iterations each time. When i is equal to 10, the inner loop will run as long as j is less than or equal to 10. When i is equal to 9, the inner loop will run as long as j is less than or equal to 9, and so on. In general, the condition i > j in a nested while loop means that the inner loop will run as long as the counter variable of the outer loop is greater than the counter variable of the inner loop. This allows you to perform some action for each combination of values of the two counter variables."
@shrutimohan78123 жыл бұрын
Very informative!
@SimplilearnOfficial3 жыл бұрын
Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!