“While” Loops

--Originally published at Ricardo's Blog

I know this is probably too basic for this time of the semester, But it’s one of the posts I forgot to make during the semester. So here it goes.

A “while” loops its pretty basic, it’ll do whats inside of it WHILE some condition it’s happening. So if the condition of the loop is positivem the loop will keep running. Over and over and over and over again. Until the condition turns false.

while

So, in this example it’ll ask the user how much money does it have. While the user types a number lower than a 100 it;ll print what’s on the screen. If it says a number above 100 it’ll type both sentences.

 

So there ya’ go. Hope it helped you.

Thanks or reading.Byeeeeeeeeeeeeeeeeeeeeeeee.