3/28
Part 1 of 7 · Floats to centsLearn and do

A table needs whole numbers

A coin-change solution keeps a table with one cell for each amount. It asks whether some mix of coins hits the target exactly. Floats can't do either job.

seen = {0.1 + 0.2: "reached"}
print(0.3 in seen)
Predict

seen = {0.1 + 0.2: "reached"}. Is 0.3 a key?

Pick one to see what it prints.
Pick an answer above to see the rest
Predict

What does table[0.30 * 100] do?

Pick one to see what it prints.
Pick an answer above to see the rest