Exam 2: Algorithm Discovery and Design
In a(n) ____________________ loop, it is possible for the loop body to never be executed.
pretest
What is pseudocode and why is it well-suited for representing algorithms?
Most computer scientists use a notation called pseudocode to design and represent algorithms. This is a set of English language constructs designed to resemble statements in a programming language but that do not actually run on a computer. Pseudocode represents a compromise between the two extremes of natural and formal languages. It is simple, highly readable, and has virtually no grammatical rules. (In fact, pseudocode is sometimes called a programming language without the details.) However, because it contains only statements that have a well-defined structure, it is easier to visualize the organization of a pseudocode algorithm than one represented as long, rambling natural-language paragraphs. In addition, because pseudocode closely resembles many popular programming languages, the subsequent translation of the algorithm into a computer program is relatively simple. Pseudocode is not a formal language with rigidly standardized syntactic and semantic rules and regulations. On the contrary, it is an informal design notation used solely to express algorithms. One of the nice features of pseudocode is that you can adapt it to your own personal way of thinking and problem solving.
An unstructured, "free-flowing" writing style should be used for writing algorithms.
False
To create a loop that executes exactly b times, we create a ____.
"Print the value of product" is an example of a(n) ____ operation.
Pseudocode is a formal language with rigidly standardized syntactic rules and regulations. _________________________
____________________ is sometimes called a programming language without any details.
The use of high-level instructions during the design process is an example of abstraction. _________________________
One of the most powerful features of a computer is its ability to handle loops.
____ statements are the "question-asking" operations of an algorithm.
Viewing an operation at a high level of abstraction and fleshing out the details of its implementation at a later time is known as ____ design.
Under what circumstances would the body of a pretest loop never be executed?
The selection of an algorithm to solve a problem is greatly influenced by the way the input ____ for that problem are organized.
Once an algorithm has been developed, it may itself be used in the construction of other algorithms.
What is the problem with using high-level programming languages to represent algorithms?
Natural language is a set of English language constructs designed to resemble the statements in a programming language but that do not actually run on a computer. _________________________
The if/then/else operation allows you to select exactly one of three alternatives.
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)