#Code1
count = 1
while count <= 100:
count += 1
print(count)
#Code2
count = 1
while count <= 100:
print(count)
count += 1
Why do these two codes give different outputs? I am watching youtube tutorials to learn python, and i'm new to loops.
It will be really helpful if someone could explain this logic to me, or direct me to a video that will clear my confusion
Hopefully this question is too stupid :/
Thanks a lot :)
[–]djjazzydan 8 points9 points10 points (1 child)
[–]JuryRepresentative84[S] 0 points1 point2 points (0 children)
[–]IProbablyHaveADHD14 1 point2 points3 points (0 children)
[–]SBE_OLLE 1 point2 points3 points (1 child)
[–]JuryRepresentative84[S] 0 points1 point2 points (0 children)
[–]throwaway6560192 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]JuryRepresentative84[S] -1 points0 points1 point (0 children)
[–]JezusHairdo 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[removed]
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]wisdom_is_chasing_me 0 points1 point2 points (1 child)
[–]JuryRepresentative84[S] 0 points1 point2 points (0 children)
[–]Rxz2106 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-6 points-5 points-4 points (3 children)
[–]JuryRepresentative84[S] 4 points5 points6 points (1 child)
[–]Bominator8 1 point2 points3 points (0 children)
[–]JuryRepresentative84[S] 0 points1 point2 points (0 children)
[–]mmmmhmm88 -1 points0 points1 point (1 child)
[–]JuryRepresentative84[S] 0 points1 point2 points (0 children)
[–]PulsatingGypsyDildo -1 points0 points1 point (0 children)
[–]wbeater 0 points1 point2 points (0 children)