Staging: a draft, not the live site
✕ Close

Week 13 · 13.5 · Fri, Oct 30 · Do Now

Do Now

Work every question in your notebook.

  1. Trace these lines. What do the boxes hold after line 3?

    n ← 17
    b ← n rem 3 ≠ 2
    c ← n ≥ 17
    1. n = 17, b = true, c = true
    2. n = 17, b = false, c = false
    3. n = 17, b = 2, c = true
    4. n = 17, b = false, c = true
  2. What is shown? The first line shown is first.

    y ← 10
    show y > 4 and y < 10
    show y > 4 or y < 10
    1. false, then false
    2. true, then false
    3. true, then true
    4. false, then true
  3. A student traced these lines and wrote that pass holds true. The right answer is false. What mistake did the student make?

    score ← 70
    pass ← score > 70 and score ≤ 100
    1. The student used the wrong value of score.
    2. The student forgot that 70 ≤ 100 is false.
    3. The student read ≤ as <.
    4. The student read > as ≥, but 70 is not greater than 70.
  4. Which question is true exactly when n is even?

    1. n ÷ 2 = 0
    2. n rem 2 = 2
    3. n rem 2 ≠ 0
    4. n rem 2 = 0
  5. Trace these lines. Write exactly what is shown, one line for each show.

    n ← 36
    even ← n rem 2 = 0
    small ← n < 50
    show even and small
    show not small