3.9 Developing Algorithms

Enduring Understanding

The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

Learning Objective

Compare multiple algorithms to determine if they yield the same side effect or result. 

Essential Knowledge

Algorithms can be written in different ways and still accomplish the same tasks.

Algorithms that appear similar can yield different side effects or results.

Some conditional statements can be written as equivalent Boolean expressions.

Some Boolean expressions can be written as equivalent conditional statements.

Different algorithms can be developed or used to solve the same problem.

Learning Objective

For algorithms:

a. Create algorithms.

b. Combine and modify existing algorithms.

Essential Knowledge

Algorithms can be created from an idea, by combining existing algorithms, or by modifying existing algorithms.

Knowledge of existing algorithms can help in constructing new ones. Some existing algorithms include:

  • determining the maximum or minimum value of two or more numbers

  • computing the sum or average of two or more numbers

  • identifying if an integer is or is not evenly divisible by another integer

  • determining a robot’s path through a maze

Using existing correct algorithms as building blocks for constructing another algorithm has benefits such as reducing development time, reducing testing, and simplifying the identification of errors.

Last updated