Year 7 · Summer 2

Raid: Code for a Cause · Lesson 5 of 5

Raid build: finish, test, improve

ProjectTopic 11 Algorithms

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

You will learn to

  • Use another guild's testing to find problems in the game and the poster.
  • Give and receive feedback using two stars and a wish.
  • Fix the most important problems first, then test again.
  • Rehearse a two-minute presentation about the cause, the poster and the game.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Success criteria

You have got it when you can say:

  • I can give another guild two specific stars and one wish.
  • I can sort what testers found into 'breaks it', 'misses the success list' and 'nice extra'.
  • I can fix a problem and show it is fixed.
  • I can present my part in our two-minute presentation.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Retrieval starter

Questions from before. Write your answers, then show them.

  1. Last lesson

    An 'if… else…' is…

    A SequenceB IterationC Selection

    C. Selection

  2. Last unit

    The Tube map leaves out real distances. That's…

    A Pattern recognitionB AbstractionC Decomposition

    B. Abstraction

  3. Earlier this year

    The numbers 3, 9, 4, 4, 10. What is the median?

    A 9B 6C 4

    C. 4

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Key words (1 of 2)

Algorithm
Precise, ordered, finite steps to solve a problem.
Decomposition
Breaking a problem into smaller ones.
Abstraction
Ignoring detail that doesn't matter for the problem.
Sequence · selection · iteration
Steps one after another. First this, then this.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Key words (2 of 2)

Pseudocode
Code-like writing for algorithms, without strict rules.
Trace table
Records variable values step by step to check logic.
Variable
A named place in memory that holds a value.

The explanation · step 1 of 4

Testing with another guild

Another guild plays your game and reads your poster. They have fresh eyes, so they see problems you cannot.

  • Play the game at least three times.
  • Try to break it: odd keys, edges, losing on purpose.
  • Read the poster from the back of the room.
  • Check that every image has a credit line.
  • Check each line of the success list: yes or no?

The explanation · step 2 of 4

Feedback: two stars and a wish

A star is something that works well. A wish is one thing to improve.

Good feedback is specific. It says exactly what and where.

e.g.Example

Specific: 'The score is easy to see. I wish the litter fell more slowly at the start.' Not specific: 'It's good.'

★Remember

When you get feedback, say thank you and write it down. Do not argue. Decide later what to change.

The explanation · step 3 of 4 · part 1 of 2

Improve: fix, then test again

  1. List everything the testers found.
  2. Sort the list into three groups.
  3. Fix the first group first.
  4. Test again after every fix.
  5. Tick off the success list.
What testers foundGroupFix
The game never ends at 0 livesBreaks the gameIf lives = 0, say 'Game over', then stop [all v]
The poster heading is too small from the backMisses the success listMake the heading much bigger
A sound when you catch litter would be funNice extraOnly if there is time left

The explanation · step 3 of 4 · part 2 of 2

Improve: fix, then test again (continued)

!Watch out

Do not start a nice extra while something still breaks the game.

The explanation · step 4 of 4

The two-minute presentation

  1. The cause, and why it matters.
  2. The poster: its message and who it is for.
  3. A short demo of the game.
  4. One thing testers found, and how you fixed it.
  5. Who did what in the guild.
★Remember

Practise out loud with a timer. Two minutes goes very fast.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Worked example

Testers found three things. The litter falls through the bin. The beach photo has no credit line. The bin could be a cooler colour. What do you fix first?

  1. Litter falling through the bin breaks the game, so fix it first. Check the touching (Bin v)? block names the right sprite.
  2. The missing credit line misses the success list, so fix it next. Add title, author, source and licence.
  3. The bin colour is a nice extra. Change it only if there is time.
  4. Test the game again after the first fix, before moving on.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Quick quiz · 1 of 3

How many times does FOR i ← 2 TO 8 repeat?

  1. A 7
  2. B 6
  3. C 8

A. 7

Both ends count: 8 − 2 + 1 = 7 (2, 3, 4, 5, 6, 7, 8).

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Quick quiz · 2 of 3

Which loop always runs at least once?

  1. A WHILE … ENDWHILE
  2. B FOR i ← 1 TO 0
  3. C REPEAT … UNTIL

C. REPEAT … UNTIL

REPEAT … UNTIL checks its condition at the end, after the first run.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Quick quiz · 3 of 3

x ← 4, then x ← x × 2, then x ← x + 1. What is x?

  1. A 8
  2. B 12
  3. C 9

C. 9

4 × 2 = 8, then 8 + 1 = 9. Each line replaces the old value.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Exit ticket

Answer on paper before you go. Then check.

  1. Which shape is used for OUTPUT total?

    A ParallelogramB RectangleC Diamond

    A. Parallelogram Input and output are always parallelograms.

  2. Breaking a problem into smaller parts is…

    A AbstractionB DecompositionC Iteration

    B. Decomposition De-compose = take apart.

Year 7 · Raid: Code for a Cause · Lesson 5 of 5

Homework and the challenge

Homework

Study page 5 steps 1 to 4.

End-of-unit challenge

Annual Raid: guild presentation scored with the shared rubric (content, design, code, teamwork) and peer review.