Course / Module 5
Module 5 of 7

Real programs

Reading input, validating, deciding, and exporting a result.

extraction validation routing output

A real program is not one clever line. It is several simple steps connected end to end: take some input, decide what to do with it, and produce a durable result someone else can use.

The program below is a small but complete claims workflow. It reads two inputs, routes the claim through nested decisions, prints the outcome, and exports a machine-readable result to a file, the kind of artifact an auditor or a downstream system can pick up.

Notice that every branch also records a decision value. The printed line is for a human; the exported value is for a machine. Same program, both audiences.

Try it in your browser

Run it. Then try days at 120, or the amount below 5000, and watch the routing and the exported result change.

Takeaway

Extraction, validation, routing, output: string those four together and you have a workflow that does real work, readable by the people who own the rules.