Big Idea 3 · Topic 3.8 · Exercise 2
How Many Passes?
25 minutes - 5 loops - decide how many times the body runs
Back to the Topic 3.8 lessonAll CSP topics
How this page works
The writing boxes below are yours. What you type stays in this browser, is saved here as you go, and is never sent to us or to your teacher. Hand the written work in the way your teacher asked for it.
The graded check at the bottom is the part that records to your teacher's gradebook.
The cases, from your handoutNot recorded
The same cases as your handout, in the same order.
Scenario 1 · Foundational
count <- 0; REPEAT 3 TIMES { count <- count + 1 }; DISPLAY(count)
Loop type (REPEAT n TIMES / REPEAT UNTIL):
How many times the body runs + final displayed value:
Enrichment - which CED case, if any (infinite / zero-times / normal):
Scenario 2 · Core
x <- 0; REPEAT UNTIL(x >= 3) { x <- x + 1 }; DISPLAY(x)
Loop type (REPEAT n TIMES / REPEAT UNTIL):
How many times the body runs + final displayed value:
Enrichment - which CED case, if any (infinite / zero-times / normal):
Scenario 3 · Core
temp <- 50; REPEAT UNTIL(temp >= 40) { temp <- temp + 5 }; DISPLAY(temp)
Loop type (REPEAT n TIMES / REPEAT UNTIL):
How many times the body runs + final displayed value:
Enrichment - which CED case, if any (infinite / zero-times / normal):
Scenario 4 · Challenge
y <- 1; REPEAT UNTIL(y = 10) { y <- y + 2 }; DISPLAY(y)
Loop type (REPEAT n TIMES / REPEAT UNTIL):
How many times the body runs + final displayed value:
Enrichment - which CED case, if any (infinite / zero-times / normal):
Scenario 5 · Challenge
n <- 10; count <- 0; REPEAT UNTIL(n <= 0) { n <- n - 3; count <- count + 1 }; DISPLAY(count)
Loop type (REPEAT n TIMES / REPEAT UNTIL):
How many times the body runs + final displayed value:
Enrichment - which CED case, if any (infinite / zero-times / normal):
No graded check on this page yetNot recorded
About the line in your handout
Your handout says this exercise is available online and auto-graded. The exercise IS here, and it is the same work in the same order, but the auto-graded half is not written for this topic yet. Nothing on this page is scored or sent to your teacher.
Hand this in the way your teacher asked for it. Topic 1.1 has its graded check today, and the rest follow.