Nested Loop In Python -15 | Python Nested Loops Tutorial | Python For Beginners | Simplilearn

  Рет қаралды 47,003

Simplilearn

Simplilearn

Күн бұрын

Пікірлер: 14
@SimplilearnOfficial
@SimplilearnOfficial 3 жыл бұрын
Got a Question on this topic? Let us know in the comment section below 👇 and we'll have our experts answer it for you.
@nimaanmi
@nimaanmi 5 ай бұрын
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. ❤
@joshwzr1257
@joshwzr1257 2 жыл бұрын
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.
@SimplilearnOfficial
@SimplilearnOfficial 2 жыл бұрын
You are most welcome
@michaelmaklan3962
@michaelmaklan3962 2 жыл бұрын
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
@lilyarman
@lilyarman 3 жыл бұрын
Very clear and brilliant presentation. Thanks
@SimplilearnOfficial
@SimplilearnOfficial 2 жыл бұрын
Glad it was helpful!
@megalas683
@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
@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."
@shrutimohan7812
@shrutimohan7812 3 жыл бұрын
Very informative!
@SimplilearnOfficial
@SimplilearnOfficial 3 жыл бұрын
Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!
@aparnaappu6961
@aparnaappu6961 Жыл бұрын
How we get jupyter notebook in phone sir
@bijlimahadev4826
@bijlimahadev4826 3 жыл бұрын
good content
@SimplilearnOfficial
@SimplilearnOfficial 3 жыл бұрын
Awesome! Thank you!
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 1 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Python Programming Series (Loops 4): Nested loops
14:45
Left Peel
Рет қаралды 170 М.
Nested loops in Python are easy ➿
5:35
Bro Code
Рет қаралды 348 М.
A Brief History of Big Data - David Ostrovsky
30:49
hayaData
Рет қаралды 1,1 М.
This Video Will Determine How RICH You Can Get With A.I
15:00
André Vedor / Revampify
Рет қаралды 82