Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Top box: Run a school canteen app | AThe sub-problem 'Write the code for everything' is still too big and is not a small task. It should be split into smaller sub-problems like Ask questions, Check answers and Show score. | |
| 2Run a school canteen app -> Take orders, Handle payments, Show menu | BSub-problems placed as boxes below the main problem, each one a smaller part of it | |
| 3Keep splitting a sub-problem until each box is a small task that can be solved on its own | CThe top box lists several tasks instead of one main problem. 'Make a quiz game' should be alone at the top, with the other tasks as sub-problem boxes below it. | |
| 4A small sub-problem box on the chart can later become a function in the program | DHandle payments -> Enter card details, Check funds, Print receipt | |
| 5Top box: Make a quiz game, Show score, Ask questions, Save high scores | EThe top-level problem box that states the one main problem to be decomposed | |
| 6Make a quiz game -> Write the code for everything | FBox: Check funds -> def check_funds(balance, price): |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
hierarchy chart — A diagram that splits one main problem into smaller sub-problems in boxes, level by level, until each box is a small task that can be solved on its own.Level 1: Make a quiz app
Level 2: Ask questions
Level 2: Show scoreLevel 1: Make a quiz app
Level 2: Ask questions
Level 3: Pick one questionMain problem: Make a quiz app
Sub-problem: Ask questions
Sub-problem: Show scoreBox: Show score
FUNCTION showScore()
PRINT scoreIF task is too big THEN split it again
ELSE stop and solve it