Computing · Year 3

Algorithms and Debugging

💻 ComputingMedium14 min
0
0 of 6

🤖 you are a . Your wants to you to make a jam . They say: 'Make a .' You because that is far too ! and need every out in the . A set of , for a is called an .

The from the of a called . He for and those every on ! 🌍

A has . , it be no like 'a bit' or '. , it be in the 5 before 2 would ! , it be no can be out. of a : out 'add and your will not .

🧩 A robot needs to make a jam sandwich. Put these steps into the correct order by numbering them 1 to 5. 🥪

  1. Put the sandwich on a plate.
  2. Open the jar of jam.
  3. Get two slices of bread from the bag.
  4. Place the two slices of bread together.
  5. Pick up the knife and spread jam on one slice of bread.

When an has a that it , we that a bug 🐛. and is called . The 'bug' when a was an in 1947, it to ! , are that are , , or in the .

tip: each out as if you were the it. Ask could this be ? Is ? Would a know what to do? If you , there is a bug there! 🔍

Let's at of . A bug is when a is outlike to say ' the before ' through the . An bug is when are into the like on your before your ! A bug is when a like when you need to .

Bug typeWhat goes wrongEveryday example
Missing stepA needed instruction is left outForgetting to say 'open the jar' before 'pour the juice'
Order bugSteps are in the wrong sequencePutting shoes on before socks
Wrong instructionA step gives incorrect informationTurning left instead of right to reach school
Three common types of bug 🐛

🗂️ Sort each bug example into the correct bug type category. 🐛

  • Algorithm says 'add cold water' but it should be hot water.

  • The algorithm goes: sit down, then push chair in, then walk to chair.

  • Instructions for brushing teeth never mention picking up the toothbrush.

  • Recipe says 'bake for 5 minutes' but it should be 50 minutes.

  • The algorithm says 'put on coat' then 'open door' then 'leave house' but never says 'close door'.

We can also an as a a that each in a box and to the . use : for and , for , and for yes or no (called ). us because we can the like a map. 🗺️

🔗 Match each flowchart shape to what it is used for. 📐

  • Oval shape

  • Rectangle shape

  • Diamond shape

  • Arrow

around 50% of their and in . Being at is just as as being at in the ! 💻

✍️ Complete the sentences below using the correct words from the word bank. 📝

A set of for a is called an . A an is called a . and that is as . We can an as a to make the to see.

Quiz time! 📝

Algorithms and Debugging — Quick Check ✅

Question 1 of 5

Tip: log in to save your score and track progress.

What is an ?

Finished?

Log in to mark this lesson complete and track your progress.