🔍 Unit 4: Algorithms — Pre-Unit Diagnostic

Assessment FOR Learning — Teacher Feedback
📋 Not Graded — Descriptive Feedback Only
Purpose: Confirms readiness for searching, sorting, and complexity. Tests prior fluency with loops, list manipulation, and elementary mathematical reasoning (powers of 2, log₂).
Question 1 — Powers of two
Fill in: 2¹° = ____. About how many times do you have to halve 1000 to get down to 1? (Estimate the closest integer.)
Question 2 — Searching the right way
A friend lost their phone. Compare these strategies:
  1. Look in every room of the house, in any order, until you find it.
  2. Phone the device and listen.
  3. Open "Find My Phone" on a laptop.
For each, explain in one sentence whether the time depends on (a) the size of the house, (b) something else, or (c) is essentially constant.
Question 3 — Manual sort
Sort this list ascending using any method, but write the order in which you'd swap adjacent pairs. List: [7, 3, 9, 1].
Question 4 — Loop fluency review
Write a loop that finds the maximum of a list nums without using max().
Question 5 — Operation counting
If a single comparison takes 1 microsecond, roughly how long does linear search take in the worst case on a list of 1 million items? On a list of 1 billion items?
Question 6 — Mental model: divide and conquer
You have a deck of 32 face-down cards numbered 1 to 32 in random order. A friend secretly puts ONE more card on top with a hidden number. You're allowed to ask "is this card > X?" questions only. What is the minimum number of questions to guarantee finding the hidden number? Explain.
Question 7 — Reading code
In one sentence, what does this function do?
def f(a): for i in range(len(a) - 1): if a[i] > a[i+1]: return False return True
Question 8 — Reflection
Have you ever written a sorting program before (any language)? If yes, what algorithm? What part felt hardest?

📝 Teacher Feedback

K/U Thinking Communication Application

Suggested next steps: