Chapter 7 Part 1
Chapter 7 Part 1
Understanding Algorithms
• An algorithm is a step-by-step set of instructions to solve a problem.
• Example: Algorithm to calculate the area of a rectangle:
o Input length and width.
o Multiply length by width.
o Output the area.
• Purpose: Clearly defines how a task is performed, ensuring consistency.