Why this happened?
sumantan mukherjee Apr 17, 03:35 PDT When I'm writing- count = 0 while count <= 10: count = count+1 if count % 2 == 0: continue print(count) In the third line, of the code I'm writing, count = count+1.But if I write this line at the end of the code it's not giving any output. While writing another one code like the code below- count = 0 while count <15: if count == 5: break print(count) count += 1 I'm writing count = count+1 at the last of the code and yet getting output , why is this happening?why I'm not able to write count = count+1 at the last of the code in the 1st one set?Please answer me. And When I sit to solve a problem , I probably get confused by loops(in case of solving a problem).I can't understand when should I use 'while loop' and when should I use 'for loop'! So, please help me to overcome this one confusion.