Ch.13 Computational Thinking and Programming Basics Vocabulary 263 words

Algorithm: finite ordered steps, not a program

An algorithm is a finite, ordered set of steps to solve a problem; the exam trap is confusing it with a full program or a random list.

Audio

Ascolta questa pagina (beta)

Sottotitoli

An algorithm is simply a step-by-step recipe to solve a problem, and it must have a clear start and end. The steps need to be in a logical order — if you swap two steps, the algorithm might fail. Crucially, an algorithm is not the same as a program: a program is an algorithm written in a specific programming language, but the algorithm itself can be expressed in plain English, a flowchart, or even a spreadsheet formula. For example, a recipe for making tea is an algorithm; the Python code to make tea is a program.

To spot an algorithm in a multiple-choice question, check for three features: finiteness (it must stop after a finite number of steps), order (steps must be in a sequence that makes sense), and definiteness (each step must be unambiguous). A common trick is to present a list of random instructions — that is not an algorithm because the order is missing. Another trap is showing a single step like "solve the equation" — that is too vague and not a finite set of steps. If you see a loop or a condition, that is still an algorithm, but it must still be finite.

A quick way to test any candidate: ask yourself, "Could I follow these steps blindly and always get the same result?" If yes, it is an algorithm. If the steps are out of order or infinite, it is not. For the exam, remember the mnemonic 'FOF' — Finite, Ordered, Finite (again) — to avoid confusing an algorithm with a program or a jumbled list.

Flashcard collegata

What is an algorithm?

A finite, ordered set of steps for solving a problem or performing a task.

Torna alla flashcard Vedi tutte le flashcard