Tqst DriIS

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

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?

0000198348 92 03 918 924782


The afrb*al pv-ite "to thavge is heve-

No, the latte was discounted by 10% to want to record in the transactions file.

1.98, which is exactly what you

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

another discount

Both kinds of discount?

It seems that there was something that the boss forgot to tell you. As well as deciding to cut the health club's own prices, he also got in touch with his old friend, the CEO of Starbuzz, and arranged for a special discount for everyone who shows the cashier a Starbuzz Discount Card. This is the email he received back:

Great to hear from you!

• thP Starbuzz discount scheme! A lot ot Yes, of course, you can join the Sta^bun ^ ^ ^^

people across the world are «f V d a so I think 1 can help your code ^please, ^ a python r <0 do any WO. a,.»

Be well and keep drinking the coffee!

Your friend, Starbuzz CEO

That's great news. Although you've heard about this extra discount late in the day, at least most of the work's already been done for you. You just need to use the Python module the Starbuzz CEO attached to his email, and your program will be set up to apply both discounts.

Let's take a look at the Starbuzz code.

Was this article helpful?

0 0

Post a comment