CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Designing loops - part 1

  • What do I repeat?
    • what is the task that is to be repeated?
  • What do I change?
    • what are the changes performed after each iteration?
  • When do I stop?
    • when do you stop repeating?
  • How do I begin?
    • what are initial conditions before the loop starts?

Hints: 

  • Identify the changes: Notice what has to be changed from one iteration to the next.
  • Identify the condition to execute or stop the loop.
  • Identify what are initial conditions and values to be set.

example