Knowledge organisersDesigning, creating and refining algorithms
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)