Page 238 -
P. 238

modular programming



                     Test Drive





           So what happens if you fire up coffee_pos.py in IDLE and buy a $2 latte?




































           It looks like it’s working on the screen. What about in the transactions.txt file? Will
           the latte still cost $2.20?



                                   00001983489203918924782           LATTE
               The actual price to
               charge is here.


           No, the latte was discounted by 10% to $1.98, which is exactly what you
           want to record in the transactions file.

           It’s time to demo your code to the boss.





                                                                                      you are here 4    203
   233   234   235   236   237   238   239   240   241   242   243