Saturday, October 23, 2010

Looping

     In the last chapter, we learned about conditions and testing and the “if statement”. Instead of counting how many times to run a loop, while loops use a test to decide when to stop a loop. “While loops” are also called conditional loops. A conditional loop keeps looping while some condition is met.



      
You can also jump out of a loop when a certain condition is met. You can use the command “break”.

No comments:

Post a Comment