Computer Science
Grade 7
20 min
Lesson 5: Pseudocode Practice: Describing Simple Tasks
Write pseudocode for common tasks like making a sandwich or drawing a square.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Translate a simple, real-world task into a sequence of pseudocode steps.
Identify and use common pseudocode keywords like START, END, INPUT, OUTPUT, and SET.
Write pseudocode that is clear, sequential, and easy for a human to follow.
Decompose a multi-step problem into smaller, individual instructions.
Differentiate between an action (a verb-like keyword) and a variable (a piece of stored information).
Review a peer's pseudocode and identify any missing or unclear steps.
Ever tried to explain how to play your favorite video game to a friend who's never seen it? 🤔 How do you make sure you don't miss a single, crucial step?
In this lesson, we'll practice writing 'pseudocode,' which is like a simple, English-based blueprint fo...
2
Key Concepts & Vocabulary
TermDefinitionExample
PseudocodeA simple, human-readable way to describe the steps of an algorithm using plain English and some common keywords. It is not a real programming language.PRINT "Hello, World!"
AlgorithmA set of step-by-step instructions for solving a problem or completing a task.A recipe for baking cookies is an algorithm.
SequenceThe order in which instructions are performed, one after another, from top to bottom without skipping any.In a morning routine algorithm, the step 'Brush Teeth' comes before 'Eat Breakfast'.
InputInformation or data that is given to a program by a user.INPUT user_age (The program waits for the user to type their age).
OutputInformation or results that a program displays or sends out to the user.PRINT "Welcome to the...
3
Core Syntax & Patterns
The START/END Block
Every pseudocode algorithm must begin with `START` and finish with `END`.
This clearly shows where the instructions begin and where they stop. It's like the front and back cover of an instruction manual.
One Action Per Line
Each line of pseudocode should describe a single, clear action.
This keeps the steps organized and easy to follow. Avoid combining multiple actions like `GET bread AND PUT jelly on it` on the same line.
Action Keywords
Use clear, capitalized action words (verbs) like `INPUT`, `PRINT`, `SET`, `GET`, `CALCULATE`.
These keywords make it obvious what kind of action is happening. `SET` is used to assign a value to a variable, while `INPUT` is used to get information from the user.
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
You are reviewing a peer's pseudocode to find the average of two numbers:
1 START
2 INPUT num1
3 CALCULATE sum as num1 + num2
4 SET average to sum / 2
5 PRINT average
6 END
What critical step is missing that makes this algorithm fail?
A.It is missing an END keyword.
B.It never asks the user for the second number (`num2`).
C.The calculation on line 4 is incorrect.
D.It should print the sum, not the average.
Challenging
Which pseudocode example best demonstrates decomposing the problem "pack a backpack for school" into clear, sequential steps?
A.START
GET backpack
GET math_book
PUT math_book in backpack
GET lunchbox
PUT lunchbox in backpack
END
B.START
PACK backpack
END
C.START
INPUT books
INPUT lunch
PACK backpack
END
D.START
GET all school items
PUT items in backpack
END
Challenging
A program needs to ask for a temperature in Celsius and convert it to Fahrenheit. The formula is F = (C * 1.8) + 32. Which pseudocode block correctly represents the solution?
A.START
INPUT fahrenheit
CALCULATE celsius as (fahrenheit - 32) / 1.8
PRINT celsius
END
B.START
PRINT "Enter Celsius:"
CALCULATE fahrenheit as (celsius * 1.8) + 32
INPUT celsius
PRINT fahrenheit
END
C.START
PRINT "Enter temperature in Celsius:"
INPUT temp_c
CALCULATE temp_f as (temp_c * 1.8) + 32
PRINT "The temperature in Fahrenheit is " + temp_f
END
D.START
SET temp_c to 20
CALCULATE temp_f
PRINT temp_f
END
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free