Learning to Program by Writing Programs


A SPECIAL NOTE AT THE BEGINNING: Too many programmable calculators today are like coffee table books, great to have on display but seldom used. As soon as you write and run the simplest of the programs that will follow, you will have done more programming with your calculator than 90% of the thousands who own these powerful tools. Some of those others use the calculators' graphics but most use them for simple calculations at best. (For example, although she loved her calculator, my wife used her powerful programmable HP-19C only for addition and subtraction. She became so enamored of its Reverse Polish processing, moreover, that I have had great difficulty finding a calculator for her now that HP19C batteries are no longer available.)

What many teachers consider the best way to learn programming is to write and run programs. This is certainly not a new concept. You learn to drive a car best by driving a car, not merely by reading a book about driving. This Inside Your Calculator webpage section provides a series of programming tasks and other exercises that are designed to take those who work on them from simple to more challenging tasks by reasonable steps.

Whether you are an individual wishing to gain programming skills or a course instructor leading students to gain those same skills, you should select from these questions those that will add to your current repertoire of skills. Although the earliest exercises may appear trivial, each of them provides its own challenge to unskilled programmers.

No answers are given for these tasks. FOR PROGRAMMING EXERCISES, RUN YOUR PROGRAM SEVERAL TIMES TO CHECK YOUR WORK. Your results will provide feedback that will tell you whether or not you have solved the given problem correctly. If it does not, the nature of the errors should help lead you to make suitable adjustments.

For classroom instruction ideas for Inside Your Calculator, some of which apply to these exercises, turn to Teaching Suggestions.

So let's get started.

Download Exercises by Chapter

Chapter 1 Exercises

Chapter 2 Exercises

Chapter 3 Exercises

Chapter 4 Exercises

Chapter 5 Exercises

Chapter 6 Exercises

Chapter 7 Exercises

Chapter 8 Exercises

Chapter 9 Exercises

Chapter 10 Exercises

Additional Programming Exercises