Chapter 8 - Algorithms

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/7

flashcard set

Earn XP

Description and Tags

Flashcards on key concepts related to algorithms, their properties, and their use in computer programming.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

Why must algorithms be unambiguous?

A good algorithm must be unambiguous to ensure computers can interpret instructions correctly.

2
New cards

What property of algorithms refers to the requirement that they terminate at some point?

The 'finiteness' property.

3
New cards

What are the general components of an algorithm in terms of inputs, processing, and outputs?

Algorithms may have zero or more inputs, may do some processing, and must have at least one output.

4
New cards

How should a correct and effective algorithm handle errors in the input?

The algorithm should always produce some output, even when there are errors in the input. It should either propose a suitable remedial action or finish elegantly, providing precise details of the error.

5
New cards

What does it mean for an algorithm to be efficient?

The algorithm should not include unnecessary steps or use a time-consuming method to carry out a task that can be carried out just as effectively in a quicker way.

6
New cards

Why are algorithms often written in simple, everyday English?

Algorithms are generally written in simple, everyday English, making them easily understood by people with little or no experience of computer programming.

7
New cards

What is often used to write algorithms intended to be turned into a computer program in a manner closer to the resultant program?

Structured English or pseudocode.

8
New cards

What is an example of a basic pseudocode algorithm for adding two numbers?

START, GET Number1, GET Number2, CALCULATE Sum = Number1 + Number2, PRINT value of Sum, END