Staging: a draft, not the live site
✕ Close

Week 13 · 13.3 · Wed, Oct 28 · Do Now

Do Now

Work every question in your notebook.

  1. A student traced this code and made the table below. Which row is wrong first?

    k ← 3
    j ← k * 2
    k ← j
    j ← j + k
    1. Line 2 row
    2. Line 3 row
    3. Line 4 row
    4. Line 1 row
  2. Build the header row, then trace all six lines.

    h ← 1
    g ← h + 9
    h ← g * 2
    f ← h - g
    g ← f + h
    show g
  3. No line repeats. How many rows does this trace table need, not counting the header?

    d ← 4
    show d
    e ← d + 1
    show e
    d ← e * d
    show d
    e ← 0
    1. 6
    2. 7
    3. 5
    4. 4
  4. Seven lines, two shows. Build the whole table, then submit it to check.

    a ← 3
    b ← a * 4
    c ← b - a
    show c
    a ← c + b
    b ← a - c
    show b