Grade 10 Information Technology: Algorithms and IPO tables
Overview
This is an informal educational resource, created for an assignment for an Honours programme module EDUC4032A at the University of the Witwatersrand, Johannesburg, South Africa
Introduction and Information
Welcome to Information Technology for grade 10!
In this unit, we will focus on the fundemental basic of programming - planning. We will look at how to plan a program using flowchart and pseudocode algorithms and also how to fill in Input Process Output tables. You will find the find the table of content below.
The following icons will appar throughout the unit, take note of their meaning:
Lesson objectives - Before each lesson, lesson objectives will be given.
Content - Lesson content is delivered below.
Multimedia - This could be any form of media, either a video or PowerPoint to help during your lesson.
Activity - Activities are given to you to practice and master the content covered.
Table of content
Lesson 1: Introduction to algorithms
Lesson 2: Flowchart and Pseduocode algorithms
Lesson 3: Input Process Output (IPO) tables
Quiz and Task
To start, click on 'Lesson 1' on the table of contents to take you to the first lesson.
Lesson 1 - Introduction to algorithms
By the end of this lesson, you should be able to:
- Explain what an algorithm is.
- Describe the characteristics of an algorithm.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
What is an algorithm?
Look at the picture below. Can you explain how you would get from house A (your house) to House B (your best friend's house)?
You would have planned an agreed that you could turn left from your house, walk until the fourway stop, turn left and continue walking till you reach your friends house. This required you to explain a logical, step-by-step way to get to house B. This sequential explanation is known as an algorithm.
algorithm – an ordered list of steps for carrying out a task or solving a problem.
To write a logical step-by-step method to solve the problem is called algorithm, in other words, an algorithm is a procedure for solving problems. Algorithms are used in our everyday lives and we probably don’t even realize it. For example, when we make coffee or when we drive to the supermarket, we follow a set of logical steps to complete the task. This is also an algorithm.
While there are no specific rules about how to write an algorithm, once it is complete it should meet the following criteria:
- There must be a limited number of steps, the steps must be:
- detailed and specific
- clear and unambiguous
- each step should:
- consist of a single task
- all repetitions must have clear ending conditions
- there must be at least one result (or output).
Watch the following video on what an algorithm is.
Go to home page Go to lesson 2
Lesson 2 - Flowchart and pseudocode algorithms
By the end of this lesson, you should be able to:
- Describe the elements of flowchart and pseudocode algorithms.
- Draw/ write flowchart and pseudocode algorithms.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
- We know that an algorithm is a sequence of steps that helps us solve a problem or compelete a task.
- There is no specific way to create an algorithm but it must meet certain criteria. Do you remeber what they are?
Flowchart and pseudocode algorithms
In computing, there are two main ways that an algorithm can be represented: Flowchart and pseudocode. The PowerPoint presentation below will further elaborate on this.
PowerPoint: Flowchart and pseudocode algorithms
Here is an example:
Ask the user to enter their age and if they are above 18, they are eligible to get a driver’s license. Display whether the user can get their driver’s license or not.
The pseudocode algorithm for this would be
BEGIN
GET Age
IF Age >= 18
THEN DISPLAY ‘You are eligible for a drivers license.’
ELSE DISPLAY ‘ You are too young for a drivers license.’
ENDIF
END
The flowchart equivalent of the same problem would be
Activity: creating flowchart and pseduocode algorithms
Draw and write a flowchart and pseudocode algorithm for the following scenario:
Display the age of a user, by getting their year of birth.
Note: Type out and draw your algorithms on Microsoft Word and submit your document below.
Use the link below to submit on Assignments
Submit on Google Classroom Assignments
Go back to lesson 1 Go to lesson 3
Lesson 3 - Input Process Output (IPO) tables
By the end of this lesson, you should be able to:
- Explain what an IPO table is.
- Discribe the input, process and output in a given scenario.
- Fill an IPO table, based on a given scenario.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Input Process Ouput tables
We already know that a computer processes information by means of the IPO cycle, shown below
In porgramming, we use IPO tables to list all input and output variables and components that we will use when coding, as well as list all the processing that takes place in the program. The below example will show how an IPO table is constructed.
Example
The pseudocode below allows the user to enter two numbers and sum of the numbers are displayed. Construct an IPO table to show all the input and output variables and the processing in the program.
BEGIN
ASK user to enter number
GET iNum1
ASK user to enter number
GET iNum2
iAns ßiNum1 + iNum2
DISPLAY iAns
END
Input | Process | Output |
The user has given these numbers, hence input iNum1 iNum2 | The two numbers are added iAns ßiNum1 + iNum2 | The answer will be displayed in this variable iAns |
Important things to remember
- Anything that is recieved from the user is an input and will go in the input column.
- All calculations or determinations will go inr the process column.
- Anything that needs to be displayed will go in the output column.
Go back to lesson 2 Go to Quiz and Activity
Quiz and Task
You have reached the end of the unit
To test your knowledge on the content covered in this unit. Take the quiz below.