So, an important part of any loop is what we call the iteration variable, okay?
And that is something that changes,
because if we don't change anything in the loop, then it's going to run forever.
That's what we call an infinite loop.
So here we have n greater than 5 and we say while n is greater than 0,
which is true, print this, come back up, check again. Is n greater than 0? Yeah.
Print this, check again, is n greater than 0? Print this.
And this is when you read your shampoo and it says lather, rinse, and repeat.
This is what a computer scientist thinks when they read that.
It's like, that would be an infinite loop.
You're going to run out of water,
you're going to run out of shampoo, you're going to run out of something, right?
But the technical problem is, is that n is not changing.
n is not changing.
And so what happens is there's no way for this true to become false.
There's no way, it just stays true, and so that's an infinite loop.
And that will literally run until your computer's battery runs out or
you unplug it or you hit some escape or whatever.
If your computer is spinning in a beach ball, it's got some little weird
little thing, it's probably in a loop that is either infinite or nearly infinite.
So this is a bad thing to do because it locks up computers.
If you write code to do this and you run it on your computer,
you will probably get some kind of a spinning beach ball or
whatever that your computer, whichever your operating system does,
because it's not good to put your computer in an infinite loop.