Why true statements aren't enough for a computer, and the three parts every algorithm shares: steps, control, termination.
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Consider this statement:
"Preheat the oven to 350°F, then mix the flour and eggs, then bake for 30 minutes."
Is this declarative knowledge (a statement of fact) or imperative knowledge (a step-by-step recipe)?
Assign the string "declarative" or "imperative" to kind.
The three outcomes of learning to program
List knowledge of concepts, programming skill and problem solving, and record the claim that programming is learned through repeated hands-on practice rather than by watching someone type.
Statements of fact against step-by-step recipes
Write the fact-style definition of a square root, y such that y * y = x, next to the guess-and-average recipe, and label which is declarative and which imperative.
The three elements of an algorithm
Trace the square-root recipe for 16 from the guess 3 through 4.17 to 4.0035, and mark on it the sequence of steps, the flow of control and the stopping test.