TABLE OF CONTENTS
Exercise Solutions.......................................................................................................................................1
Exercise 1.1...............................................................................................................................................1
Exercise 1.2...............................................................................................................................................2
Exercise 1.3...............................................................................................................................................3
Review Questions Answers.........................................................................................................................4
Programming Exercises Solutions.............................................................................................................8
Debugging Exercises Solutions ..................................................................................................................8
EXERCISE SOLUTIONS
EXERCISE 1.1
1. List three common types of computing agents.
Solution:
Human beings, desktop computers, cell phones
2. Write an algorithm that describes the second part of the process of making change (counting out the coins
and bills).
Solution:
There are various ways to do this, but here is one:
Repeat
Select the largest unit of money that is less than or equal to the remaining change
Subtract this unit from the remaining change
Until the remaining change is 0
The collection of units selected represent the change
3. Write an algorithm that describes a common task, such as baking a cake
Category | Testbanks |
Comments | 0 |
Rating | |
Sales | 0 |