The list of tasks:
' 'Get the number of weeks PRINT "How many weeks" INPUT WEEKS ' 'Calculate and print the number of weeks PRINT "The number of days is", WEEKS * 7 ' END
It may seem to you that what we are doing now is obvious. But in truth, what is difficult about programing (and many other activities) is looking at a big problem and then breaking it into smaller problems, each of which can be solved.
In mathematics, problems like these are called "story problems," and are loved for their intellectual challenge. Here is a story problem:
At the beginning of 1997 you purchased two fixed-rate bonds: a $10,000 bond at 7% annual interest and a $5,000 bond at 5% annual interest. What will be the total worth of these bonds after one year?
Here is a plan for solving the problem:
Rearrange the order of the tasks into another sequence that will also solve the problem.