CMPSC 200 Final Exam PSU Questions With
Correct Answers
Computer - CORRECT ANSWER✔✔-a programmable electronic device that can
| | | | | | | | |
store, retrieve, and process data
| | | |
input - CORRECT ANSWER✔✔-data from the user is entered into the computer
| | | | | | | | | | |
Processing - CORRECT ANSWER✔✔-the computer is instructed what to do you
| | | | | | | | | | |
the program, often using information that was input to the program
| | | | | | | | | |
Output - CORRECT ANSWER✔✔-input inputted or processed through the
| | | | | | | | |
program is output to the user
| | | | |
High-level computer architecture - CORRECT ANSWER✔✔-the main memory
| | | | | | | |
stores programs and program data in random access memory (RAM)
| | | | | | | | |
CPU - CORRECT ANSWER✔✔-central processing unit
| | | | |
CPU has two main components - CORRECT ANSWER✔✔-arithmetic and logic unit
| | | | | | | | | | |
(ALU) - mathematical operations
| | | |
control unit - fetches the next instruction, decodes the instruction, and then
| | | | | | | | | | | |
executes the instruction as appropriate
| | | |
,Volatile memory - CORRECT ANSWER✔✔-temporary storage, information is lost
| | | | | | | | |
when the power to the memory is lost. typically faster or higher performing than
| | | | | | | | | | | | | |
non-volatile memory | |
ex: RAM, DRAM (dynamic ram)
| | | |
Non-volatile memory - CORRECT ANSWER✔✔-permanent storage, information
| | | | | | |
persists even after power is lost. typically slower than volatile memory
| | | | | | | | | | |
ex: read-only memory (ROM), compact discs (CD), magnetic tape
| | | | | | | |
Program - CORRECT ANSWER✔✔-a set of instructions to perform specific tasks
| | | | | | | | | |
Algorithm - CORRECT ANSWER✔✔-a set step for "doing something"
| | | | | | | |
Operating systems - CORRECT ANSWER✔✔-allocated computer resources and
| | | | | | | |
allows communication between the user and the computer
| | | | | | |
High-level languages - CORRECT ANSWER✔✔-easy for humans to understand, but
| | | | | | | | |
too difficult for a computer to understand
| | | | | | |
Low-level languages - CORRECT ANSWER✔✔-harder for humans to understand,
| | | | | | | | |
but easier for a computer to convert to usable instructions
| | | | | | | | |
Machine language - CORRECT ANSWER✔✔-generally quite difficult for humans to
| | | | | | | | |
understand, the binary digits that contain instructions that can be understood by
| | | | | | | | | | | | |
the computer
|
,Compiled - CORRECT ANSWER✔✔-code written by the programmer is reduced to
| | | | | | | | | | |
a set of machine-specific instructions prior to runtime. these instructions are
| | | | | | | | | | |
saved as executable files, which can be run
| | | | | | |
MATLAB stands for - CORRECT ANSWER✔✔-Matrix laboratory
| | | | | |
Three phases of program writing - CORRECT ANSWER✔✔-Analyze, implement,
| | | | | | | | |
maintain the code | |
Analyze - CORRECT ANSWER✔✔-- specify what the program needs to do
| | | | | | | | | | |
- develop the algorithm(s) to solve your problem
| | | | | | | |
- verify that what you have will work
| | | | | | |
Implement - CORRECT ANSWER✔✔-- code the program
| | | | | | |
- test the program
| | |
Maintain the code - CORRECT ANSWER✔✔-for large or long-term software
| | | | | | | | | |
systems, this can be the most expensive part
| | | | | | |
Constant - CORRECT ANSWER✔✔-a variable whose value is not intended to
| | | | | | | | | | |
change
Create script - CORRECT ANSWER✔✔-- where we are going to store commands
| | | | | | | | | | | |
- they do not execute they are simply stored
| | | | | | | |
- working in a script allows you to save your work
| | | | | | | | | |
, clc - CORRECT ANSWER✔✔-clear the command window
| | | | | |
clear - CORRECT ANSWER✔✔-delete all the variables from the workspace
| | | | | | | | |
To delete specific variables type - CORRECT ANSWER✔✔-clear(variable)
| | | | | | |
Block comment - CORRECT ANSWER✔✔-%{..........%}
| | | |
- must put writing on the next line from the first percent
| | | | | | | | | | |
By doing .* it gives you - CORRECT ANSWER✔✔-an element by element operation
| | | | | | | | | | | |
A variable can - CORRECT ANSWER✔✔-contain multiple pieces of information
| | | | | | | | |
abs(data#) - CORRECT ANSWER✔✔-absolute value | | | |
sqrt(#) - CORRECT ANSWER✔✔-square root
| | | |
nthroot(#,#) - CORRECT ANSWER✔✔-nth root (x,n) | | | | |
sign(#) - CORRECT ANSWER✔✔-signum function
| | | | |
- if the input is positive MATLAB will return the number +1
| | | | | | | | | | | |
- if the input is negative MATLAB will return the number -1
| | | | | | | | | | | |
Correct Answers
Computer - CORRECT ANSWER✔✔-a programmable electronic device that can
| | | | | | | | |
store, retrieve, and process data
| | | |
input - CORRECT ANSWER✔✔-data from the user is entered into the computer
| | | | | | | | | | |
Processing - CORRECT ANSWER✔✔-the computer is instructed what to do you
| | | | | | | | | | |
the program, often using information that was input to the program
| | | | | | | | | |
Output - CORRECT ANSWER✔✔-input inputted or processed through the
| | | | | | | | |
program is output to the user
| | | | |
High-level computer architecture - CORRECT ANSWER✔✔-the main memory
| | | | | | | |
stores programs and program data in random access memory (RAM)
| | | | | | | | |
CPU - CORRECT ANSWER✔✔-central processing unit
| | | | |
CPU has two main components - CORRECT ANSWER✔✔-arithmetic and logic unit
| | | | | | | | | | |
(ALU) - mathematical operations
| | | |
control unit - fetches the next instruction, decodes the instruction, and then
| | | | | | | | | | | |
executes the instruction as appropriate
| | | |
,Volatile memory - CORRECT ANSWER✔✔-temporary storage, information is lost
| | | | | | | | |
when the power to the memory is lost. typically faster or higher performing than
| | | | | | | | | | | | | |
non-volatile memory | |
ex: RAM, DRAM (dynamic ram)
| | | |
Non-volatile memory - CORRECT ANSWER✔✔-permanent storage, information
| | | | | | |
persists even after power is lost. typically slower than volatile memory
| | | | | | | | | | |
ex: read-only memory (ROM), compact discs (CD), magnetic tape
| | | | | | | |
Program - CORRECT ANSWER✔✔-a set of instructions to perform specific tasks
| | | | | | | | | |
Algorithm - CORRECT ANSWER✔✔-a set step for "doing something"
| | | | | | | |
Operating systems - CORRECT ANSWER✔✔-allocated computer resources and
| | | | | | | |
allows communication between the user and the computer
| | | | | | |
High-level languages - CORRECT ANSWER✔✔-easy for humans to understand, but
| | | | | | | | |
too difficult for a computer to understand
| | | | | | |
Low-level languages - CORRECT ANSWER✔✔-harder for humans to understand,
| | | | | | | | |
but easier for a computer to convert to usable instructions
| | | | | | | | |
Machine language - CORRECT ANSWER✔✔-generally quite difficult for humans to
| | | | | | | | |
understand, the binary digits that contain instructions that can be understood by
| | | | | | | | | | | | |
the computer
|
,Compiled - CORRECT ANSWER✔✔-code written by the programmer is reduced to
| | | | | | | | | | |
a set of machine-specific instructions prior to runtime. these instructions are
| | | | | | | | | | |
saved as executable files, which can be run
| | | | | | |
MATLAB stands for - CORRECT ANSWER✔✔-Matrix laboratory
| | | | | |
Three phases of program writing - CORRECT ANSWER✔✔-Analyze, implement,
| | | | | | | | |
maintain the code | |
Analyze - CORRECT ANSWER✔✔-- specify what the program needs to do
| | | | | | | | | | |
- develop the algorithm(s) to solve your problem
| | | | | | | |
- verify that what you have will work
| | | | | | |
Implement - CORRECT ANSWER✔✔-- code the program
| | | | | | |
- test the program
| | |
Maintain the code - CORRECT ANSWER✔✔-for large or long-term software
| | | | | | | | | |
systems, this can be the most expensive part
| | | | | | |
Constant - CORRECT ANSWER✔✔-a variable whose value is not intended to
| | | | | | | | | | |
change
Create script - CORRECT ANSWER✔✔-- where we are going to store commands
| | | | | | | | | | | |
- they do not execute they are simply stored
| | | | | | | |
- working in a script allows you to save your work
| | | | | | | | | |
, clc - CORRECT ANSWER✔✔-clear the command window
| | | | | |
clear - CORRECT ANSWER✔✔-delete all the variables from the workspace
| | | | | | | | |
To delete specific variables type - CORRECT ANSWER✔✔-clear(variable)
| | | | | | |
Block comment - CORRECT ANSWER✔✔-%{..........%}
| | | |
- must put writing on the next line from the first percent
| | | | | | | | | | |
By doing .* it gives you - CORRECT ANSWER✔✔-an element by element operation
| | | | | | | | | | | |
A variable can - CORRECT ANSWER✔✔-contain multiple pieces of information
| | | | | | | | |
abs(data#) - CORRECT ANSWER✔✔-absolute value | | | |
sqrt(#) - CORRECT ANSWER✔✔-square root
| | | |
nthroot(#,#) - CORRECT ANSWER✔✔-nth root (x,n) | | | | |
sign(#) - CORRECT ANSWER✔✔-signum function
| | | | |
- if the input is positive MATLAB will return the number +1
| | | | | | | | | | | |
- if the input is negative MATLAB will return the number -1
| | | | | | | | | | | |