Big Idea 3 · Topic 3.8 · Exercise 1
Trace the Savings Loop
25 minutes
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.
Part B, from your handoutNot recorded
Your handout says these are the same items available here. Part A stays on paper.
Q1 · 3 points on the handout
Loops C and D are BOTH REPEAT UNTIL(savings >= 20) loops, yet one runs zero times and one runs forever. Using their starting values and bodies, explain what makes the difference.
Q2 · 3 points on the handout
Loop A (REPEAT 4 TIMES) and Loop B (REPEAT UNTIL) both end with savings = 20. Are they interchangeable? Give one situation where you could use REPEAT n TIMES and one where you would be forced to use REPEAT UNTIL.
Q3 · 2 points on the handout
ENRICHMENT: A REPEAT UNTIL loop can run many times, exactly once, or zero times. Explain how all three are consistent with the CED statement that iteration repeats 'a set of statements zero or more times.'
Q4 · 0 points on the handout
Next step: you traced these by hand. Now head to the Topic 3.8 page and type and run the harder versions, where the computer checks your output for you.
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.