4-Function Calculator

The First Line

Here's what my calculator would so first:
Show "0."
Did you write something like that? I told you it's super simple.

OK, just this much, we will turn it into a program. Type it into the edit panel below:

When we write a program, it will consist of lines like this one, but every line will be one of the "5 basic concepts" mentioned in the Preface, that all programs are made from. Do you remember what they were? Here are the five again, in case you forgot:

Sequence
Iteration
Conditional
Variables
Input/Output
Any program you can think of, any program anybody ever wrote, any program the computer knows how to run, all it is is variations of these five things. So after you write down a general description of what your program needs to do, any part of it that is not one of these five things, you just need to describe in more detail, until every detail is one of these five.

This first line in your calculator program is output. What happens next in your program? Which one of these five basic concepts do you think best describes it?

Type it in on the next line of your program. Then turn the page.

<<Previous | ToC | Next >>

[2021 June 16]