Thursday, March 31, 2011
Bitter Lemons
After running in circles for awhile with my unfamiliarity of python I did finally have some success determining what is going on with how Lemonade stand calculates the items purchased. (and after breaking the code royally, I really appreciated the ability to checkout a clean version with subversion!) It appears to be written to check each individual item 1st; instead of totaling all 3 items and then checking that against the amount of available cash. A player may or may not overspend until the 3rd item…in any case no error message is given to explain this problem. So, that means a little more work than just working with a variable or two...looks like I’m going to work on pseudo coding a method (again my python is rusty) that will total and check this condition first...if indeed this is the desired solution—will find that out in a few hours.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment