Langkau ke kandungan

    Flowchart Falls

    Flowcharts Umur 9–11

    Plan an algorithm as a diagram: ovals to start and stop, rectangles for actions, diamonds for decisions and arrows to show the way.

    • Umur 9–11
    • 3 misi
    • Permulaan → Semakin mahir → Cabaran

    A flowchart is a picture of an algorithm. Before writing a single line of code, programmers often sketch the steps and decisions as boxes joined by arrows — it is far easier to spot a mistake in a diagram than in a finished program.

    Apa yang akan dipelajari anak anda

    • Know the main flowchart shapes: oval, rectangle, diamond and arrow
    • Follow a flowchart from start to end
    • Trace what happens at a decision with a yes and a no path
    • Recognise a loop: an arrow that goes back to an earlier step

    Four shapes

    An oval marks the start or the end. A rectangle holds an action: “add 1 to the score”. A diamond holds a yes-or-no question: “Is the score more than 10?” Arrows show which step comes next, and a diamond always has two ways out.

    From diagram to code

    Every flowchart shape has a matching piece of code. A diamond becomes an “if … else”. An arrow looping back becomes a “repeat”. If the flowchart works when you trace it with your finger, the program will work too.

    Contoh soalan

    Berikut ialah beberapa soalan seperti dalam misi pertama. Bolehkah anda menjawabnya?

    1. 1. In a flowchart for brushing your teeth, which step comes first?

      • Put toothpaste on the brush
      • Put the brush away
      • Spit out the toothpaste
      • Rinse your mouth
      Tunjuk jawapan

      Jawapan: Put toothpaste on the brush. The order of steps matters in every algorithm.

    2. 2. A flowchart asks “Is it raining?” Yes leads to “Take an umbrella”; No leads to “Wear a hat”. It is raining. What happens?

      • Both
      • Nothing
      • Wear a hat
      • Take an umbrella
      Tunjuk jawapan

      Jawapan: Take an umbrella. The answer is yes, so follow the yes arrow.

    3. 3. Which flowchart shape shows a yes-or-no decision?

      • An oval
      • A circle
      • A diamond
      • A rectangle
      Tunjuk jawapan

      Jawapan: A diamond. A diamond holds a question with two possible answers.

    Tip untuk orang dewasa

    • Draw a flowchart for an everyday job: crossing the road, making toast.
    • Trace each other’s flowcharts with a finger and try to find a missing path.
    • Turn a flowchart into Scratch blocks, shape by shape.