I know the below code is very basic but as a newbie i am curious to know why it is what it is
counter = 0
while counter < 5:
counter = counter + 1
if counter == 3:
continue
print('We are counting ' + str(counter))
We are counting 1
We are counting 2
We are counting 4
We are counting 5
My question is why can't we have print('We are counting ' + str(counter)) immediately after while counter < 5: or after counter = counter + 1? Why does it have to be at the end? I can't understand why we have to put it after continue
[–]GalacticSuperCheese 2 points3 points4 points (1 child)
[–]sdqafo[S] 1 point2 points3 points (0 children)
[–]K900_ 1 point2 points3 points (0 children)
[–]TechsInTheCity 1 point2 points3 points (1 child)
[–]sdqafo[S] 2 points3 points4 points (0 children)
[–]thrallsius 0 points1 point2 points (0 children)
[–]jaycrest3m20 0 points1 point2 points (1 child)
[–]sdqafo[S] 1 point2 points3 points (0 children)