Skip to main content

Section 5.6 Loops-WE3-P1

Subsection 5.6.1 Subgoals for Evaluating a Loop

  1. Diagram which statements go together.
  2. Define and initialize variables
    1. Determine the start condition.
    2. Determine the update condition.
    3. Determine the termination condition.
    4. Determine body that is repeated.
  3. Trace the loop.
    1. For every iteration of the loop, write down the values.

Subsection 5.6.2 Loops-WE3-P1

Exercises Exercises

Put the code in the right order to create a program that will continue to generate integers between 1 and 100 (inclusive) until the value generated is less than 6 or greater than 95. Print the numbers generated.
You have attempted of activities on this page.