Deck 2: Algorithm Discovery and Design

ملء الشاشة (f)
exit full mode
سؤال
When writing arithmetic expressions in pseudocode, you may assume that the computing agent executing your algorithm has all the capabilities of a typical calculator.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The fact that natural language can have many different meanings in different contexts makes it difficult to use for designing algorithms.
سؤال
Pseudocode is a special set of English language constructs modeled to look like the statements available in most programming languages.
سؤال
Control operations can be used to alter the normal sequential flow of control in an algorithm.
سؤال
A sequential algorithm executes its instructions in a straight line from top to bottom and then stops.
سؤال
Input and output allow the computing agent to communicate with the outside world.
سؤال
In a posttest loop, it is possible for the loop body to never be executed.
سؤال
Java and C++ are examples of pseudocode languages.
سؤال
The if/then/else operation allows you to select exactly one of two alternatives.
سؤال
One of the most powerful features of a computer is its ability to handle loops.
سؤال
The process of finding a solution to a given problem is called algorithm discovery.
سؤال
When writing arithmetic expressions in pseudocode, it is safe to assume that the computing agent already knows the basic trigonometric functions, sine, cosine, and tangent.
سؤال
In pseudocode, it does not matter exactly how you choose to write your instructions as long as the intent is clear and unambiguous.
سؤال
With a natural language, different readers can interpret the same sentence in totally different ways.
سؤال
Once an algorithm has been developed, it may itself be used in the construction of other algorithms.
سؤال
An unstructured, "free-flowing" writing style should be used for writing algorithms.
سؤال
Languages such as Java and C++ are the algorithmic design languages of choice.
سؤال
The three basic sequential operations are called addition, multiplication, and exponentiation.
سؤال
Finding the maximum number in a given set is an example of a problem that computer scientists want to solve.
سؤال
Having an infinite loop in an algorithm is an error.
سؤال
If, then, and else are examples of ____ statements.

A) primitive
B) iterative
C) sequential
D) conditional
سؤال
____ operations allow the computing agent to receive data values from the outside world that it may then use in later instructions.

A) ingoing
B) outgoing
C) input
D) output
سؤال
In addition to designing a correct algorithm, computer scientists concern themselves with algorithmic efficiency.
سؤال
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.

A) bottom-up
B) top-down
C) increasing size
D) increasing depth
سؤال
____ is the process of searching for a special pattern of symbols within a larger collection of information.

A) Sequential search
B) Dynamic processing
C) Pattern matching
D) Pattern search
سؤال
____ is the ability to separate the high-level view of an entity or an operation from the low-level details of its implementation.

A) Inheritance
B) Randomness
C) Encapsulation
D) Abstraction
سؤال
Computer algorithms are limited to accepting only two values as input.
سؤال
A purely ____ algorithm is also called a straight-line algorithm.

A) sequential
B) conditional
C) iterative
D) control
سؤال
In a posttest loop, the continuation condition is tested at the ____ through the loop.

A) beginning of each pass
B) beginning of just the first pass
C) end of each pass
D) end of just the last pass
سؤال
A ____ is the repetition of a block of instructions.

A) cycle
B) nucleus
C) matrix
D) loop
سؤال
Iteration should be minimized when designing algorithms.
سؤال
____ is an example of a natural language.

A) C
B) Java
C) English
D) Perl
سؤال
The multiplication operation can be reduced to repeatedly adding a number a certain number of times.
سؤال
Most computer scientists use ____ to design and represent algorithms.

A) natural languages
B) high-level programming languages
C) low-level programming languages
D) pseudocode
سؤال
The technique of looking at all the items in a list, starting at the beginning of the list, one at a time, until we either find what we are looking for or come to the end of the list is called ____ search.

A) sequential
B) control
C) iterative
D) random
سؤال
Consider this line of code: Set the value of Area to length*width "Area" is a____.

A) value
B) variable
C) constant
D) primitive
سؤال
A(n) ____ is a named storage location that can hold a data value.

A) expression
B) variable
C) computation
D) constant
سؤال
The two parts of a "while" statement are known as the loop head and the loop body.
سؤال
Together, conditional and iterative operations are called ____ operations.

A) sequential
B) control
C) hierarchical
D) dynamic
سؤال
In a pretest loop, the continuation condition is tested at the ____ through the loop.

A) beginning of each pass
B) beginning of only the first pass
C) end of each pass
D) end of only the last pass
سؤال
Which statement exemplifies abstraction?

A) The president of General Motors views the company in terms of every worker, every supplier, and every car.
B) The president of General Motors views the company in terms of its corporate divisions and high-level policy issues.
C) A good approach to algorithm design and software development, is to focus on how we might actually implement a particular operation.
D) A convenient way to view the hardware component called "memory" is to focus on the billions of electronic devices that go into constructing a memory unit.
سؤال
In the multiplication algorithm discussed in this chapter, the statement, "Get values for a and b" is a(n) ____ operation.

A) sequential
B) conditional
C) input
D) output
سؤال
The standard algorithm for searching a(n) ____ list of values is called sequential search.

A) ordered
B) unordered
C) numerical
D) alphabetical
سؤال
A(n) ____ is a collection of useful algorithms.

A) primitive
B) binary
C) set
D) library
سؤال
The design of an algorithm to solve a problem is highly dependent on the organization of the ____ involved in the problem.

A) words
B) data
C) solutions
D) pseudocode
سؤال
How are the computer science terms, "index", and "pointer" related?

A) the index refers to the pointer
B) the pointer refers to the index
C) the index holds a value, while the pointer references a value
D) they are synonyms
سؤال
In order to implement a "find" functionality in a word processor, one would have to design a ____ algorithm.

A) pattern matching
B) natural language
C) sequential
D) do-while
سؤال
The ____ loop is an example of a posttest loop.

A) do-while
B) do
C) while
D) if-then-else
سؤال
How could an algorithm fall into an infinite loop?

A) the input operations were missing
B) the algorithm uses more than one loop
C) the output operations were missing
D) the continuation condition of the loop never becomes false
سؤال
"Print the value of product" is an example of a(n) ____ operation.

A) sequential
B) conditional
C) input
D) output
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Algorithm Discovery and Design
1
When writing arithmetic expressions in pseudocode, you may assume that the computing agent executing your algorithm has all the capabilities of a typical calculator.
True
2
The fact that natural language can have many different meanings in different contexts makes it difficult to use for designing algorithms.
True
3
Pseudocode is a special set of English language constructs modeled to look like the statements available in most programming languages.
True
4
Control operations can be used to alter the normal sequential flow of control in an algorithm.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
A sequential algorithm executes its instructions in a straight line from top to bottom and then stops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
Input and output allow the computing agent to communicate with the outside world.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In a posttest loop, it is possible for the loop body to never be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Java and C++ are examples of pseudocode languages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
The if/then/else operation allows you to select exactly one of two alternatives.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
One of the most powerful features of a computer is its ability to handle loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The process of finding a solution to a given problem is called algorithm discovery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
When writing arithmetic expressions in pseudocode, it is safe to assume that the computing agent already knows the basic trigonometric functions, sine, cosine, and tangent.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
In pseudocode, it does not matter exactly how you choose to write your instructions as long as the intent is clear and unambiguous.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
With a natural language, different readers can interpret the same sentence in totally different ways.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Once an algorithm has been developed, it may itself be used in the construction of other algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
An unstructured, "free-flowing" writing style should be used for writing algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Languages such as Java and C++ are the algorithmic design languages of choice.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
The three basic sequential operations are called addition, multiplication, and exponentiation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
Finding the maximum number in a given set is an example of a problem that computer scientists want to solve.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Having an infinite loop in an algorithm is an error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
If, then, and else are examples of ____ statements.

A) primitive
B) iterative
C) sequential
D) conditional
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
____ operations allow the computing agent to receive data values from the outside world that it may then use in later instructions.

A) ingoing
B) outgoing
C) input
D) output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
In addition to designing a correct algorithm, computer scientists concern themselves with algorithmic efficiency.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
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.

A) bottom-up
B) top-down
C) increasing size
D) increasing depth
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
____ is the process of searching for a special pattern of symbols within a larger collection of information.

A) Sequential search
B) Dynamic processing
C) Pattern matching
D) Pattern search
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
____ is the ability to separate the high-level view of an entity or an operation from the low-level details of its implementation.

A) Inheritance
B) Randomness
C) Encapsulation
D) Abstraction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
Computer algorithms are limited to accepting only two values as input.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
A purely ____ algorithm is also called a straight-line algorithm.

A) sequential
B) conditional
C) iterative
D) control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
In a posttest loop, the continuation condition is tested at the ____ through the loop.

A) beginning of each pass
B) beginning of just the first pass
C) end of each pass
D) end of just the last pass
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
A ____ is the repetition of a block of instructions.

A) cycle
B) nucleus
C) matrix
D) loop
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Iteration should be minimized when designing algorithms.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
____ is an example of a natural language.

A) C
B) Java
C) English
D) Perl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
The multiplication operation can be reduced to repeatedly adding a number a certain number of times.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
Most computer scientists use ____ to design and represent algorithms.

A) natural languages
B) high-level programming languages
C) low-level programming languages
D) pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
The technique of looking at all the items in a list, starting at the beginning of the list, one at a time, until we either find what we are looking for or come to the end of the list is called ____ search.

A) sequential
B) control
C) iterative
D) random
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Consider this line of code: Set the value of Area to length*width "Area" is a____.

A) value
B) variable
C) constant
D) primitive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
A(n) ____ is a named storage location that can hold a data value.

A) expression
B) variable
C) computation
D) constant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The two parts of a "while" statement are known as the loop head and the loop body.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Together, conditional and iterative operations are called ____ operations.

A) sequential
B) control
C) hierarchical
D) dynamic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
In a pretest loop, the continuation condition is tested at the ____ through the loop.

A) beginning of each pass
B) beginning of only the first pass
C) end of each pass
D) end of only the last pass
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
Which statement exemplifies abstraction?

A) The president of General Motors views the company in terms of every worker, every supplier, and every car.
B) The president of General Motors views the company in terms of its corporate divisions and high-level policy issues.
C) A good approach to algorithm design and software development, is to focus on how we might actually implement a particular operation.
D) A convenient way to view the hardware component called "memory" is to focus on the billions of electronic devices that go into constructing a memory unit.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
In the multiplication algorithm discussed in this chapter, the statement, "Get values for a and b" is a(n) ____ operation.

A) sequential
B) conditional
C) input
D) output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The standard algorithm for searching a(n) ____ list of values is called sequential search.

A) ordered
B) unordered
C) numerical
D) alphabetical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
A(n) ____ is a collection of useful algorithms.

A) primitive
B) binary
C) set
D) library
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The design of an algorithm to solve a problem is highly dependent on the organization of the ____ involved in the problem.

A) words
B) data
C) solutions
D) pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
How are the computer science terms, "index", and "pointer" related?

A) the index refers to the pointer
B) the pointer refers to the index
C) the index holds a value, while the pointer references a value
D) they are synonyms
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
In order to implement a "find" functionality in a word processor, one would have to design a ____ algorithm.

A) pattern matching
B) natural language
C) sequential
D) do-while
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
The ____ loop is an example of a posttest loop.

A) do-while
B) do
C) while
D) if-then-else
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
How could an algorithm fall into an infinite loop?

A) the input operations were missing
B) the algorithm uses more than one loop
C) the output operations were missing
D) the continuation condition of the loop never becomes false
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
"Print the value of product" is an example of a(n) ____ operation.

A) sequential
B) conditional
C) input
D) output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.