AmbifulWorksheets
Cheat sheet
CBSE · Class 6 · Computational Thinking and AI

Simple Pattern Recognition and Decision Making

We use patterns we have seen to make decisions: if–then rules, rules checked in order, and labelling a new item like its nearest example.

Key ideas

Remember

“weight > 15 kg”strictly more: 15 kg itself does not count
Distance in this chapterdifference in the first numbers + difference in the second numbers
Example(3, 8) to (6, 4): 3 + 4 = 7
Bus every 15 minutes8:00, 8:15, 8:30, 8:45 → next at 9:00
Sorting into groupsclassification

Watch out

Worked example

(a) A parcel sorter uses: Rule 1: if weight > 15 kg, label "Heavy". Rule 2: otherwise, if length > 40 cm, label "Long". Rule 3: otherwise, label "Small". (Check the rules in order.) A parcel weighs 13 kg and is 10 cm long. Which label does it get?
(b) A parcel sorter uses: Rule 1: if weight > 20 kg, label "Heavy". Rule 2: otherwise, if length > 30 cm, label "Long". Rule 3: otherwise, label "Small". (Check the rules in order.) Parcels (weight, length): (2 kg, 50 cm), (31 kg, 35 cm), (20 kg, 45 cm), (21 kg, 15 cm), (32 kg, 45 cm). How many are labelled "Small"?

Working: (a) 13 is not more than 15; 10 is not more than 40, so Rule 3; (b) Long, Heavy, Long, Heavy, Heavy

Answer: (a) Small; (b) 0