Identify the inputs, processes, and outputs for a problem
2.1.2 Designing, creating and refining algorithms
Practise exam questionsDesigning, creating and refining algorithms — Note 1 of 7
Every algorithm can be broken down into three stages: inputs (the data the algorithm receives), processes (how the data is transformed or calculated), and outputs (the result produced). Identifying these three stages is the first step in designing any algorithm and helps you understand what data is needed, what needs to happen to it, and what the expected result should be.
# Input
length = float(input("Enter the length: "))
width = float(input("Enter the width: "))
# Process
area = length * width
# Output
print("The area is:", area)Ready to test yourself?
Practise 2.1.2 questionsBack to Designing, creating and refining algorithms
Revise another OCR GCSE topic: Searching and sorting algorithms, Computational Thinking