Programming languages - AQAInputs and outputs

Proficient programming requires knowledge of many techniques. These techniques allow for powerful, complex programs to be created.

Part ofComputer ScienceComputational thinking and problem solving

Inputs and outputs

are a sequence of logical instructions for carrying out a task.

Algorithms are needed to design computer programs. An algorithm will have data and should produce data after it has carried out a process. This is known as the input-process-output model.

In the illustration below, input is the coming into the process from outside of the system:

Diagram showing the four categories processes fall into, inputs, processes, outputs and storage

Process is the stage where all the tasks are carried out.

Output is where data comes out after the tasks have been processed.

The storage section sends or keeps additional data needed for the process.

For example, a simple algorithm could take in two numbers (inputs), add them together (process) and print them to the screen (output).

Example

INPUT number1 INPUT number2 total = number1 + number2
OUTPUT total

In the above example:

  • the inputs are number1 and number2
  • the process is adding the two numbers together
  • the storage is assigning the answer to the total variable
  • the output is printing the total to the screen.