4-Function Calculator

The most important part of writing any program is to understand what the program needs to do. If you don't understand how the program is going to work, you cannot succeed at telling the computer how the program needs to work. Understanding it means telling somebody -- perhaps yourself, but it's better to tell somebody else -- what the program is going to do.

In English (or Spanish or Chinese, whatever language you think in).

Then after you know what the computer must do, you have a shot at describing -- still in English or whatever -- how it will do that. Write it down. On paper with a pencil is good, but if you think better that way, you can use your computer's note pad. Paper is better, because you can draw pictures if that helps. Whatever helps you to understand what the computer needs to do.

I can't emphasize this too much, programming is all about telling the computer what it needs to do, and once you have it in English, all the rest is just translating. Those of us who know two languages know how hard that can be, but that is what programming is all about, saying in English what the computer must do, then saying the same thing in the computer language. Then you are done. Really. When you accurately told the computer what you want it to do, then it will do that.

So, let's get started.

Do you have a calculator? Maybe you have a calculator app on your smart phone or computer. What does it do?

It calculates. That's a start, but not yet very helpful. What exactly does it do? How do you (the user) add two numbers together, say 2+3, what steps do you take, and what does the calculator do? Write it down, then turn the page.
 

<<Previous | ToC | Next >>

[2021 May 12]