[Chicago-talk] Containable examples

Steven Lembark lembark at wrkhors.com
Thu May 24 11:23:33 PDT 2007


> What is an example of a small, easily explained and containable project?

Every society today that has computers has some
form of gambeling. How about keeping track of
net winnings? The game of chance can be generic,
all you need to do is keep track of starting
cash, what is wagerd (negative offset), and won
(positive offset) with a halt-on-zero.

Estimating maximum miles to travel for a car with
roughly consistent MPG (k/l). Given the amount of
gas put into the tank, miles traveled, how likely
is the car to run out of gas before the next rest
stop? The program knows how full the tank is at
the start, the maximum tank value, MPG rating of
the automobile, and a fudge factor for safety. The
program tracks miles traveled (negative offset
factored by MPG), gasoline added (positive offset),
and how many miles are available ( remaining tank
* MPG * ( 1 - fudge factor)).



-- 
Steven Lembark                                         85-09 90th Street
Workhorse Computing                                  Woodhaven, NY 11421
lembark at wrkhors.com                                      +1 888 359 3508


More information about the Chicago-talk mailing list