Week 1 · Demo Track

Exercise runtime smoke test

One of each exercise type, wired to exercises.js.

A section of lecture prose

In 1994 a cryptographer looked at a vending machine and saw a contract. This paragraph exists so the worksheet cards below sit inside real prose, the way they would in a finished course.

Quick check

Which enforcement mechanism does a vending machine use?

Try it

Make this print the first five square numbers.

One way to do it
console.log([1,2,3,4,5].map(n => n * n).join('\n'));

Same numbers; the map form reads as a single thought.

Write

In a sentence or two: what does the vending machine not know about its buyer, and why will that matter?

0 words · saved on this device

Compare

A strong answer notices the machine only sees the coin — not the buyer's age, the coin's provenance, or anything else off-machine. That gap is the oracle problem.

Label it

Match each numbered stage of the coin's path.

Project · part 1 of 6

Over this course you'll build a vending machine in code. Start the project: write a function that accepts a coin value and either dispenses (returning change) or rejects the coin.

One workspace for the whole course — your code follows you from week to week, saved on this device.

Reading packet · Week 1

Seminar question

Does the styling hold together?