[Tutor] Vending machine program

Alan Gauld alan.gauld at btinternet.com
Sat Jan 5 02:26:49 CET 2013


On 04/01/13 17:47, bob gailer wrote:

> > Further selections can be made if there is enough credit.
>
> This is confusing. You could drop that line with no ill effect. I am not
> sure what it even means.

It seemed straightforward enough to me Bob.
If you put in $10 and buy a candy bar for $6 you have $4 credit left.
You can then choose another item provided it costs less than $4.

It just implies another level of loop in the design.

In fact given the detail of the spec its hard to see what we could add 
by way of help until the OP produces some code to critique.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list