# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.csprinciples.com/big-idea-3/3.9-developing-algorithms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
