130,637 views
44 votes
44 votes
Think about a game that you enjoy playing. Use an example from that game to explain a condition-controlled loop. Use an example from the game to explain either a forever loop or a count-controlled loop. Explain how these examples contribute to the player’s experience (remember, useful terms include “mood” and how the four “O’s” create player engagement).

User Andreas Hinderberger
by
2.7k points

1 Answer

25 votes
25 votes

Answer: By intending the statements in the body of the loop you visually set them apart from the surrounding code. This makes your program easier to read and debug. Also, this is similar to the style that most programmers follow when writing loops.

User Edward Anthony
by
3.2k points