This is a lesson in in the course, Introduction to Algorithms, which is a part of The School of Computer Science
Objective
Variables
In the above example it is fairly simple to follow the piece of toast through the algorithm, but if you imagine that the algorithm could become more complex, and thus the progress of the toast much harder to follow. In order that, at any point in the algorithm, it is clear what is being talked about, names are often given to things. For example
Algorithm for making buttered toast (3.0)
LETA = a loaf of bread
LETT = a toaster
LETP = a plate
LETB = some butter
LETS = cut slice fromAgetAmove theStoTturn onTwait forTmove theStoPspreadSwithB
Assignments
Completion status: this resource is a stub, which means that pretty much nothing has been done yet.