Tuesday, October 4, 2016

What are while loops?

While loops are loops that continue to run as long as the condition is true. The loop will continue to run until the program is cancelled or until the statement is no longer true. A thing to consider with while loops is that the loop should end at some point.These kinds of loops are perfect for games and allow the game to end when attributes such as lives run out or when a timer runs down.

No comments:

Post a Comment