1/7
Flashcards on key concepts related to algorithms, their properties, and their use in computer programming.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Why must algorithms be unambiguous?
A good algorithm must be unambiguous to ensure computers can interpret instructions correctly.
What property of algorithms refers to the requirement that they terminate at some point?
The 'finiteness' property.
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.
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.
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.
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.
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.
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