← Back to course
Code Crew G3 / Week 11 / Wednesday
3/6
Week 11 Β· Decomposition

Wednesday

// Breaking it down

Wednesday: Decompose & Order

Rocket wants to make a pancake breakfast for three people. He, Raven and his dad are hungry!

First they list the small jobs. Next they put the jobs in order.

"Which job happens more than once?" Raven asks. Nova hints, "Look for a job you do for each person." Let's plan the pancake breakfast.

Decomposition is the FIRST step. Then you put the small steps in ORDER (Week 1!) and decide which can REPEAT (Week 2!) or have IFs (Week 3!).

Plan a pancake breakfast for 3 people

Step 1: list at least 5 subtasks.

β€’ ____________________________________
β€’ ____________________________________
β€’ ____________________________________
β€’ ____________________________________
β€’ ____________________________________

Step 2: number them in the order they should happen.

Step 3: circle any subtask that REPEATS (e.g. flipping each pancake).

Decomposition Tree

Draw a tree: BIG GOAL at the top, branches into smaller tasks.

Goal: PLAN A PIZZA NIGHT

Order and Repeat the Parts

USE YOUR WEEKS
  • Read the question.
  • Tap your answer.
Pancakes for 3 people: which part repeats?
Which part must come first?
Cook one pancake runs 3 times. Which tool from Week 2 is that?
IF a pancake is too dark, cook a new one. Which week is that?
Pizza night parts: make dough, add sauce, add toppings, bake. Which part comes first?
Which part comes last?
Pizza night makes 2 pizzas. How many times does bake run?
StatementTrue or false?
After decomposing, you put the parts in order.?
Some parts can repeat, like a loop.?
The order of parts never matters.?
A decomposition tree has the big goal at the top.?
WHY THIS EXERCISEPlanning with order and loops is exactly how programs are built.
A plan has 5 parts. One part repeats 3 times. The other parts run once. How many part runs in all?
WHY THIS EXERCISELoops inside a plan change how many steps really happen.
Try it
Plan a fruit snack for two people with a grown-up.
List the parts and number them in order.
Circle any part that repeats.

Quick Check

PANCAKE BREAKFAST FOR 3 PEOPLE
  • ?Mix flour, water and eggs in the bowl
  • ?Serve the pancakes
  • ?Get out a bowl and a pan
  • ?Repeat 3 times: cook one pancake
WHY THIS EXERCISEFirst you decompose, then you order the subtasks. A subtask that repeats becomes a loop, just like in Week 2.
← Tuesday