Computer Science Grade 7 20 min

Lesson 3: Sequencing: Putting Steps in the Right Order

Learn the importance of sequence in algorithms and practice ordering steps in simple tasks.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define 'sequencing' as the specific order of instructions in an algorithm. Explain why the order of steps is critical for a program to run correctly. Break down a real-world task into a series of sequential steps. Write a simple algorithm for a given problem using correctly sequenced instructions. Translate a simple, sequenced algorithm into pseudocode. Identify and correct sequencing errors in a simple, flawed algorithm. Ever tried to put on your shoes before your socks? 👟🧦 Of course not! The order you do things matters, and it's the most important rule for computers, too. In this lesson, we'll explore sequencing, which is simply the art of putting instructions in the correct order. You'll learn why this is the most fundamenta...
2

Key Concepts & Vocabulary

TermDefinitionExample AlgorithmA finite list of well-defined, step-by-step instructions to solve a problem or complete a task.A recipe for baking cookies is an algorithm. Each step, from mixing flour to setting the oven temperature, must be followed. SequencingPlacing instructions in a specific, logical order for a computer to execute. It's the default way programs run: one step after another.In a game, the sequence might be: 1. Display character. 2. Wait for user input. 3. Move character based on input. Instruction (or Statement)A single, specific action or command in an algorithm or program.`moveForward(10)` or `print('Hello, World!')` are single instructions. Program FlowThe order in which a computer executes the instructions in a program. In a simple sequence, the flow...
3

Core Syntax & Patterns

Top-to-Bottom Execution Computers read and execute code starting from the first line and moving down, one line at a time, until they reach the end. This is the fundamental rule of sequencing. Unless you use more advanced control structures (like loops or conditionals), the program will always follow this straight path. Order is Critical The output of a program depends entirely on the sequence of its instructions. Changing the order will change the result. Always double-check that your steps are in the most logical order to achieve your goal. A single step out of place can cause the entire program to fail or produce an incorrect result.

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
An algorithm is designed to swap the values of two variables, `x` and `y`. A temporary variable, `temp`, must be used. Which step is the most critical first action after the initial values are set?
A.SET x TO y
B.SET temp TO x
C.SET y TO x
D.DISPLAY x
Challenging
Analyze the following pseudocode: 1. SET score TO 50 2. SET bonus TO 25 3. SET score TO score + bonus 4. SET bonus TO 10 5. DISPLAY score What value will be displayed?
A.75
B.85
C.60
D.50
Challenging
This pseudocode is supposed to get a price, add tax, and display the total, but it's wrong: 1. GET price 2. SET total TO price + tax 3. DISPLAY total 4. SET tax TO price * 0.10 Which single change (by swapping two lines) will fix the algorithm?
A.Swap line 2 and line 4
B.Swap line 1 and line 2
C.Swap line 3 and line 4
D.Swap line 1 and line 4

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from Chapter 1: The Magic of Algorithms: From Everyday Life to Computer Code

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.