0

Can anybody explain me while if inside a function? How it works

29th May 2020, 1:16 PM
Abrar Raiyan
Abrar Raiyan - avatar
3 odpowiedzi
+ 7
To get help from the community, you should put your code in playground and link it here. Thanks!
29th May 2020, 3:09 PM
Lothar
Lothar - avatar
+ 1
Use of nested `while` loop, `if` inside `while` loop, or something else? I don't get what you mean by "while if inside a function", maybe you could edit the question title to clarify your intention.
29th May 2020, 1:59 PM
Ipang
+ 1
Basically if inside infinite while is used to break the loop. Let say you have written below code, Count = 1 while True: Count += 1 Above code will run till is reaches to maximum values the count can store. Now if you want to come out of the while loop when count value is 50 then you can use if break as below. Count = 1 while True: If Count == 50: break Count += 1
29th May 2020, 4:23 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar