L
Answers to Odd-Numbered
Review Questions
Chapter 1
Multiple Choice
1.
b
3.
a
5.
b
7.
c
9.
a
11.
a
13.
b
Find the Error
1.
The algorithm performs the math operation at the wrong time. It multiplies width by length before getting values for those variables.
Algorithm Workbench
1.
Display “What is the customer’s maximum amount of credit?”
Input maxCredit.
Display “What is the amount of credit used by the customer?”
Input creditUsed. availableCredit = maxCredit – creditUsed.
Display availableCredit.
3.
Display “What is the account’s starting balance?”
Input startingBalance.
Display “What is the total amount of the deposits made?”
Input deposits.
L-1
L-2
Appendix L
Answers to Odd-Numbered Review Questions
Display “What is the total amount of the withdrawals made?”
Input withdrawals.
Display “What is the monthly interest rate?”
Input interestRate. balance = startingBalance + deposits – withdrawals. interest = balance * interestRate. balance = balance + interest.
Display balance.
Predict the Result
1.
7
Short Answer
1.
Main memory, or RAM, holds the sequences of instructions in the programs that are running and the data those programs are using. Main memory, or RAM, is usually volatile. Secondary storage is a type of memory that can hold data for long periods of time—even when there is no power to the computer.
3.
An operating system is a set of programs that manages the computer’s hardware devices and controls their processes. Windows and UNIX are examples of operating systems. Application software refers to programs that make the computer useful to the user. These programs solve specific problems or perform general operations that satisfy the needs of the user. Word processing, spreadsheet, and database packages are all examples of application software.
5.
Because machine language programs are streams of binary numbers, and