🧠Concept

Pick the right answer.

Concept · Q1
The list fruits contains: apple, mango, grape. You run (item # of [mango] in [fruits ▾]). What is the result?
Concept · Q2
What does (item # of [item] in [list ▾]) return when the item is NOT in the list?
Concept · Q3
What is the difference between (item # of [item] in [list ▾]) and <[list ▾] contains [item]?>?
Concept · Q4
Is Scratch list search case-sensitive? For example, does searching for "Apple" find "apple"?

👀Code Reading

Look at the blocks. Predict what happens.

Code Reading · CR1
The list colors contains: red, blue, green. The user types "blue" when asked. What does the sprite say?
when flag clicked
ask [What color?] and wait
if <[colors v] contains (answer)?> then
  say [Found it!] for (2) seconds
else
  say [Not in the list.] for (2) seconds
end
Code Reading · CR2
The list items contains: sword, shield, potion. The user types "axe". What does the sprite say?
when flag clicked
ask [Search for:] and wait
set [pos v] to (item # of (answer) in [items v])
if <(pos) = (0)> then
  say [Not found.] for (2) seconds
else
  say (join [Found at index ] (pos)) for (2) seconds
end
Code Reading · CR3
The list nums contains: 5, 10, 15, 10. What does the sprite say?
when flag clicked
say (item # of [10] in [nums v]) for (2) seconds

🐛Find the Bug

Something is broken. Pick the fix.

The sprite should say "Found!" when the user's answer is in the list animals, and "Not found." otherwise. Instead, it says "Not found." for most animals that ARE in the list. What is wrong?

when flag clicked
ask [Enter an animal:] and wait
if <(item # of (answer) in [animals v]) = (1)> then
  say [Found!] for (2) seconds
else
  say [Not found.] for (2) seconds
end

🛠️Build It

Pick a level. Build it. Check the boxes.

🧑‍🏫
For the teacher

Review the student's project, then check each thing they did.

Project Evaluation

0 of 4 ticked

💬Talk About It

Present your project to your teacher or a classmate.

  1. 1️⃣Show a friend your search project.
  2. 2️⃣Point to the search block.
  3. 3️⃣Say its name: item # or contains.
🧑‍🏫
For the teacher

Watch the student present, then check each thing they did.

Presentation Checklist

0 of 4 ticked

📤Submit

Send your results to your teacher and parent.

0 of 0 answered