Exam 2: Algorithm Discovery and Design

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In a(n) ____________________ loop, it is possible for the loop body to never be executed.

Free
(Short Answer)
4.8/5
(35)
Correct Answer:
Verified

pretest

What is pseudocode and why is it well-suited for representing algorithms?

Free
(Essay)
4.8/5
(37)
Correct Answer:
Verified

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.

Free
(True/False)
4.8/5
(38)
Correct Answer:
Verified

False

Java and C++ are examples of pseudocode languages.

(True/False)
4.8/5
(35)

To create a loop that executes exactly b times, we create a ____.

(Multiple Choice)
4.9/5
(38)

What is pattern matching?

(Essay)
4.8/5
(37)

"Print the value of product" is an example of a(n) ____ operation.

(Multiple Choice)
4.8/5
(40)

Pseudocode is a formal language with rigidly standardized syntactic rules and regulations. _________________________

(True/False)
5.0/5
(32)

____________________ is sometimes called a programming language without any details.

(Short Answer)
4.8/5
(41)

The use of high-level instructions during the design process is an example of abstraction. _________________________

(True/False)
4.8/5
(34)

____ is an example of a natural language.

(Multiple Choice)
4.9/5
(37)

One of the most powerful features of a computer is its ability to handle loops.

(True/False)
4.7/5
(38)

____ statements are the "question-asking" operations of an algorithm.

(Multiple Choice)
4.9/5
(41)

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.

(Multiple Choice)
4.8/5
(31)

Under what circumstances would the body of a pretest loop never be executed?

(Essay)
4.8/5
(39)

The selection of an algorithm to solve a problem is greatly influenced by the way the input ____ for that problem are organized.

(Multiple Choice)
4.8/5
(43)

Once an algorithm has been developed, it may itself be used in the construction of other algorithms.

(True/False)
4.8/5
(34)

What is the problem with using high-level programming languages to represent algorithms?

(Essay)
4.8/5
(37)

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

(True/False)
4.9/5
(40)

The if/then/else operation allows you to select exactly one of three alternatives.

(True/False)
4.9/5
(40)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)