Different Types of Algorithms
The Fibonacci sequence is given by {1, 1, 2, 3, 5, 8, 13, 21, ...}. The 12th and 13th values in the sequence are _____.
144, 233
Look at the following assignment statements: X = 5X = X * X The statement produces the value _____ for X.
25
Which one of the following statement(s) is true regarding algorithms?
Algorithms can be non-recursive
Which of the following statement(s) best describe input?
Data provided to the algorithm by the main program usually at the beginning of an algorithm - or - Data which are needed by the algorithm to solve a specific task
Which of the following is a characteristic of an algorithm?
Uniqueness - or - Generality - or - Finiteness - or - Precision
Look at the following assignment statements: X = 5X = X + 2.5 The statement produces the value of _____ for X.
7.5
Which of the following statements best describes algorithms?
A sequence or set of rules to be followed in calculations or other problem-solving operations, especially by a computer. - or - A precise characterization of a method of solving a problem
Which one of the following algorithms produces only one output?
Function
Which one of the following are parts of most algorithms?
Input and output - or - Input, algorithm, and output
Which of the following statements best describes procedures?
May also be called a subroutine, subprogram, or function. - or - Usually requires several inputs and produces several outputs.
Which one of the following appliances may not use algorithm in their operation?
Pressure cooker - or - Stand mixer - or - Toaster
Which one of the following is not function of any algorithm?
Provide you the most efficient way to adjust/modify your program
A well-designed algorithm must have the following properties:
Solution - or - Finiteness
Which one of the following is not a programming language using algorithms?
Variables - or - Assignment statement
Which of the follow strings is a subset of a Fibonacci sequence?
{233, 377, 610, 987, ...}. - or - {8, 13, 21, 34, ...} - or - {0, 1, 1, 2, 3, ...} - or - {987, 1,597, 2,584, 4,181, ...}