Curriculum
Course: Intermediate : Algorithms & Coding
Login

Curriculum

Intermediate : Algorithms & Coding

Text lesson

Revising Concepts from Previous Grades

This lesson builds on the foundational coding concepts learned in Grade 4, introducing more advanced logical structures and problem-solving techniques. Students will revise basic coding blocks (addition, subtraction, multiplication, division, comparisons) and work with variables, event triggers, and simple conditionals.

New concepts include If-Then-Else statements, hiding and showing variables, setting object positions, and generating random numbers. Students will apply these skills through interactive activities such as a mouse reaction game and a number guessing game, reinforcing logical thinking and computational skills.

Revised Concepts from Previous Grades

These are the coding concepts that students have already learned and will be revising.

1. Number and Text Variables

 

  • A variable is like a container that stores information.

  • A number variable holds numbers (e.g., score = 5).

  • A text variable holds words or sentences (e.g., name = "John").

    Example in a guessing game:

    • Store a random number in randomNumber.
    • Store the user’s guess in guess.

2. Coding Blocks

Coding blocks are visual instructions used in block-based coding environments like Scratch. They allow students to create programs without writing text-based code.

 

  • Add (+) – Adds two numbers.
    Example: 5 + 3 gives 8.

  • Subtract (-) – Subtracts one number from another.
    Example: 10 - 4 gives 6.

  • Multiply (×) – Multiplies two numbers.
    Example: 6 × 2 gives 12.

  • Divide (÷) – Divides one number by another.
    Example: 12 ÷ 3 gives 4.

  • Greater than ( > ) – Checks if one number is bigger than another.
    Example: 5 > 3 (true), 2 > 6 (false).

  • Less than ( < ) – Checks if one number is smaller than another.
    Example: 4 < 9 (true), 10 < 2 (false).

3. Event Triggers

  • Events tell the computer when to run a set of instructions.
  • Example:
    • “When the green flag is clicked, move the character forward.”
    • “When the space key is pressed, make the character jump.

4. If Then

 

  • A conditional statement that checks if something is true.

    • Example: If the score reaches 10, display “You win!”
    scratch
     
     
     
     

    Set x to / Set y to

    These blocks are used to set an object’s position on the screen.