• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/75

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

75 Cards in this Set

  • Front
  • Back
1. Computers were originally conceived as tools for solving specific problems
True
Bill Gates designed the first working computer.
False.
Although Charles Babbage is usually credited with the design of the first computer, one could argue that the counting boards in use in 500 BC from which the abacus was derived would qualify as a computer design.
Programs cannot interact with the world outside the computer without an operating system.
False.
Operating systems arrived on the scene quite late in the development of computers. Before then, the computer ran one application that did all the work, and
this is still possible today.
Programs cannot interact with the world outside the computer without drivers.
False.
The driver is just a pluggable operating system component.
Programs cannot interact with the world outside the computer without hardware interfaces.
True.
For a computer to be useful there has to be hardware to carry data to and from the processor.
Application programs have access to shared memory.
True
An algorithm bridges the gap between the available data and the result to be achieved.
False.
A solution solves the whole problem by assembling solutions to manageable subproblems. An algorithm is a series of steps to solve a small subproblem.
A computer language is not a(n) ________exercise; it is a
________tool for communication and problem solving.
1. theoretical; practical
Together with the use of binary encoding for storing numerical values,___________ was the genesis of general-purpose computing as we know it today.
2. the Von Neumann architecture
Most operating systems today use ___________, which is
actually a data file containing an image of everything you would like to have in RAM.
3. virtual memory
Operating systems contain a group of programs called
__________that allow you to perform functions such as
printing, copying files, and listing the file names.
4. utilities
Many __________are loaded automatically when the
operating system starts, and others are loaded upon user request.
5. application programs
Even when a program appears to execute properly, you must check the results carefully to find__________ errors.
6. logic
Problem solving is the process of designing a collection of ______________.
7. solutions to subproblems
The process of problem solving is a search for a match between ___________ one can achieve from the given data and ____________ from which the answer can be achieved.
8. states;
states
A bag of groceries is an example of abstraction.
True.
An algorithm is a series of logical steps that solves one specific problem.
False. Written correctly, algorithms can be generalized to solve a range of subproblems..
It is impossible to write a complete, practical program in any paradigm other than procedural.
3. True.
Both functional and object-oriented programs require procedural components to function on a processor.
4. To be useful to an algorithm, the result of every computation must be assigned to a variable.
True.
5. In programming, if you know the values of z and x in the expression z = x + y, you can derive the value of y.
False.
This is merely the assignment of the sum of x and y to z; you cannot make any inference about the value of y from this expression.
6. Untyped languages are free to ignore the nature of the data in variables.
False.
Untyped languages merely leave the programmer free of needing to define the type of data. The CPU has to have information about the nature of each data item in order to process it correctly.
7. Anything assigned to be the value of a variable is an object.
True.
8. Class is a concept restricted to object-oriented programming.
False.
In general, especially in MATLAB, the class of an item refers to its data type. The more restrictive definition combining the data type with the operations performed on it is an OOP restriction.
9. You can permanently save the commands entered in the Command window.
False.
You must use scripts for permanent command storage.
10. Double-clicking an entry in the Command History window lets you rerun that command.
True.
11. You can manually change the values of variables displayed in the Workspace window.
True.
Clicking the icon to the left brings up the Document window
12. You double-click a file name in the Current Directory window to run that script.
False.
Double-clicking a file name opens the file in the editor.
13. A Document window lets you view and edit data items.
True.
14. MATLAB permits multiple Graphics windows to be open simultaneously.
True.
15. An asterisk on the File Name tab in the Editor window indicates that this is a script that can be executed.
False.
The asterisk indicates that the file has been changed since it was saved.
16. MATLAB echoes comments entered in a script in the Command window.
False.
Comments appear only in the text of the script for human understanding of the logic.
17. When the name of script is typed in the Command window, it will be saved if necessary before it is executed.
False.
Only the F5 hot key saves before executing.
1. __________means expressing a quality apart from a particular implementation.
Abstraction
2. ____________ is a sequence of instructions for solving a
problem.
An algorithm
3. Without , ____________ a programming solution can be
mathematically proven to be correct.
side effects
4. Variable names must not begin with ___________.
a numeric character
5. Armed with both the _________and______________
of a variable, a compiler can do a better job of ensuring that the programmer isn’t misinterpreting data.
name;
type
6. An instance of a ___________ is ___________ that is usually stored in a variable of that ____________ .
class;
object;
class
7. You can ___________ in the Command window in a
manner similar to the way you ___________ on a scientific
calculator.
perform calculations;
perform calculations
8. You _______________ an entry in the Command History
window to _____________ that command.
double-click; repeat the execution
9. The columns in the Workspace window show the __________ of the variable, its ____________ , and
two indications of its _____________ .
name; current value; data type
10. You _____________ the name of a file in the Current
Directory window to edit that file.
double-click
11. A Document window opens automatically when you ___________ a ___________in the Workspace
window.
double-click; variable name
12. Graphics windows are created ___________ when a ____________ requests a graph.
automatically; MATLAB command
13. You create comments by putting a __________ in the text file.
percent sign (%)
14. MATLAB will __________ all text from the comment mark
to __________.
ignore; the end of the current line
1. A homogeneous collection must consist entirely of numbers.
1. False. Homogeneous collections must consist of data of the same type. This could be double, logical, char, or any of the types you saw in this text.
2. The function linspace(...) can create only vectors, whereas the functions zeros(...), ones(...), and rand(...) produce either vectors or arrays of any dimension.
2. True.
3. The length(...) function applied to a column vector gives you the number of rows.
3. False.
Because a column vector has more columns than rows, it returns the number of columns.
4. You can access any element(s) of an array of any dimension using a single index vector.
4. True.
Regrettably, you can. This is the array linearization. Should you use this? No.
5. Mathematical or logical operators are allowed only between two arrays of the same shape (rows and columns).
5. False.
Either array can be a scalar quantity (a 1 x 1 array).
6. You can access data in a vector A with an index vector that is longer than A.
6. True,
as long as the indices in the index vector do not exceed the dimensions of A.
7. You can access data in a vector A with a logical vector that is longer than A.
7. False. The position of the values in the logical index vector correspond to the position of values in the vector being indexed. Longer logical index vectors are reaching beyond the end of the original vector.
8. When moving a block of data in the form of specified rows and columns from array A to array B, the shape of the block in A must match the shape of the block in B.
8. True.
1. Vector elements have two attributes that make them unique: their __________ and their __________.
1. numerical value;
position in the vector
2. Vectors can be created using the colon operator, for example, B = 1:3:20, where the first number is the __________ , the second number is the __________ , and the third number is the __________ .
2. starting value;
increment;
ending value
3. When indexing a source vector with a logical vector, the result will contain the __________ of the source vector corresponding in position to the __________ in the logical vector.
3. elements;
true values
4. The normal precedence of operators can be overruled by the use of __________ .
4. parentheses
5. Arithmetic operations can be performed collectively on the individual components of two arrays as long as both arrays _________ or one of them is __________ .
5. have the same dimensions; a scalar
6. To remove elements from arrays, you write __________ in __________.
6. the empty vector, [];
complete rows or columns
7. Removing rows or columns from an array is _________ ,
and can lead to __________ . Wherever possible, use __________ to __________ .
7. bad;
logical difficulties;
indexing;
copy the rows and columns you want to keep
1. MATLAB keywords are colored green by the editor.
1. False.
Comments are colored green; keywords that control execution are colored blue.
2. Indentation is required in MATLAB to define code blocks.
2. False.
The MATLAB editor inserts indentation only to clarify for the reader the flow of control in a script.
3. It is possible that no code at all is executed by 'if' or 'switch' constructs.
3. True.
If the if statement has no else clause, or the switch statement has no otherwise clause and the data provided matches none of the specified cases.
4. The word 'true' is a valid logical expression.
4. True.
5. When evaluating a sequence of logical && expressions, MATLAB will stop processing when it finds the first true result.
5. False.
The result that invalidates all other && expressions is false.
6. The for loop repeats the enclosed code block a fixed number of times even if you modify the index variable within the code block.
6. True.
But you can still use break to exit the loop early.
7. Using a break statement is illegal in a while loop.
7. False.
But it ought to be. This is really bad programming practice.
8. The logical expression used in a while loop specifies the conditions for exiting the loop.
8. False.
The expression specifies the reason to stay in the loop.
1. MATLAB uses __________ in the text to define the extent
of code blocks.
1. key command words
2. The function __________ is implicitly called by MATLAB
if you supply a vector of logical values to the if statement.
2. all(...)
3. It is good practice to include __________ in a switch
statement to trap illegal values entering the switch.
3. otherwise
4. There is no reason to evaluate any more components of a logical or expression once a __________ result has been found.
4. true
5. A while loop can be repeated a ___________ number of
times, depending on the ___________ being processed.
5. variable;
values of data
6. If you are in a __________ loop, you can use the break
statement to skip immediately out of the __________ loop.
6. for or while;
innermost containing