Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Input, process, output

Every computer task takes input, processes it with steps, and gives output; learn to spot the three parts and write them in pseudocode.

Get the whole book: Computers and coding for classes 6 to 8 (8 lessons, free to print)

Let us begin

The big idea

A calculator, a washing machine and a video game all do the same three things: take something in, work on it, and give something out. Computer scientists call this input, process, output. Once you can see these three parts, you can plan any program.

Input is what goes into the computer: numbers typed on a keyboard, a click of the mouse, a photo from a camera or a sound from a microphone. In a plan we write INPUT followed by the variable that stores it, for example INPUT length.

Process is the work the computer does with the input: adding, comparing, sorting, counting. This is where the steps of the algorithm live, for example area = length * breadth.

Output is what comes out: words on the screen, a printed page, a sound or a light. We write OUTPUT followed by what to show, for example OUTPUT area.

Writing a plan with these simple English-like words is called pseudocode. It is not a real programming language, so nothing runs it, but it is clear enough that a person could follow it, and it can be turned into any real language later.

Input, process, output for finding an areaThree boxes in a row joined by arrows. The first, labelled Input, holds length 6 and breadth 4. The middle, labelled Process, holds area = length times breadth. The last, labelled Output, holds 24. Examples of devices appear under each box. INPUT length = 6 breadth = 4 PROCESS area = length * breadth OUTPUT 24 keyboard, mouse, camera, microphone the processor follows the steps screen, printer, speaker Every program: take in, work on, give out
Information flows from left to right: input is taken in, the process works on it, and the output comes out.

Worked examples

See how it works

  1. Area of a rectangle

    INPUT length. INPUT breadth. area = length * breadth. OUTPUT area. Trace with length = 6 and breadth = 4: area = 24, and the output is 24.

  2. Average of three marks

    INPUT m1, m2, m3. total = m1 + m2 + m3. average = total / 3. OUTPUT average. With marks 70, 80 and 90: total = 240, average = 80.

  3. Spotting the parts in daily life

    A washing machine: input is dirty clothes, water and the programme you choose; process is washing, rinsing and spinning; output is clean wet clothes. A calculator: input is the keys you press, process is the sum, output is the number on the display.

Try it at home

Be the computer

You will need

  • Paper slips for inputs
  • A pencil
  • A bowl

What to do

  1. On paper write this pseudocode: INPUT a. INPUT b. sum = a + b. double = sum * 2. OUTPUT double.
  2. Write five numbers on slips and put them in the bowl.
  3. A friend picks two slips (the input) and gives them to you. You are the processor: follow the lines in order and write each variable value.
  4. Say the final OUTPUT aloud. Then swap roles.
  5. Change the process line to double = sum * 3 and run it again. Which part changed: input, process or output?

Practice sheet

Check what you learned

Write your answers in a notebook, or print this sheet and write on it. When you finish, mark your work with the answer key.

Practice sheet: Input, process, output (Classes 6-8, Computers and coding)

  1. Name the three parts of every computer task, in order.
  2. Is a keyboard an input device or an output device?
  3. Is a printer an input device or an output device?
  4. In the area pseudocode, which line is the process?
  5. What is pseudocode?
  6. Run this: INPUT n. result = n * n. OUTPUT result, with n = 7. What is the output?
  7. For a microwave oven, what is the input, the process and the output?
  8. Write pseudocode to take a price and output the price with 10 added.
  9. A program outputs the wrong average. Which part would you check first: the input, the process or the output?
  10. Why is pseudocode written in simple English words instead of a real language?

Answer key

Answers: Input, process, output

Do the practice sheet first, then check here. If an answer is different from yours, read the lesson again and try once more.

  1. Input, process, output.
  2. Input.
  3. Output.
  4. area = length * breadth.
  5. A plan written in simple English-like steps that a person can follow; it is not run by a computer.
  6. 49
  7. Input: the food and the time you set. Process: heating. Output: hot food (and the beep).
  8. INPUT price. newprice = price + 10. OUTPUT newprice.
  9. The process, because that is where the calculation is done (though checking the input is also sensible).
  10. So that anyone can read it and it can later be turned into any programming language.
WhatsApp us