PREDICT · EXPERIMENT · EXPLAIN

Count operations as inputs change

Count one specified body operation in a loop.

Loading your progress…

About 10 minutes per task · No AI required
  1. 01Predict
  2. 02Experiment
  3. 03Explain
  4. 04Review
Starting experiment

Count operations as inputs change

linear, n=4. Count body executions only.

Rules of this learning model
  • Only body executions count; tests, assignments and increments do not.
  • linear uses i=0 while i<n; triangle executes the body i+1 times for each i; doubling starts i=1, repeats while i<n, then doubles i.
  • This computes operation counts, not real execution times.

Loading the experiment…

Your submitted answers and experiment position are saved only in this browser. They are shared between the Japanese and English views of the same conditions.