Big Idea 3 · Topic 3.1 · Exercise 1
Trace the Log
25 minutes
Back to the Topic 3.1 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
Write your own three-line assignment sequence (using two variables) that ends by DISPLAYing a value that surprises someone who thinks assignment creates a link. State the displayed value and why it surprises them.
Q2 · 3 points on the handout
To swap the values of two variables you generally need a THIRD (temporary) variable. Using a <- 4 and b <- 9, write the swap with a temp and explain what would go wrong if you tried a <- b; b <- a with no temp.
Q3 · 2 points on the handout
ENRICHMENT: In the log, points <- goals copied a number. If instead a variable roster held a LIST and you wrote copyRoster <- roster, the exam reference sheet says this assigns a copy of the list. Explain how that connects to the idea that a variable holds exactly ONE value, and predict whether changing roster later would change copyRoster.
Q4 · 0 points on the handout
Next step: you traced these values by hand. Now head to the Topic 3.1 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.