May
23
2017

Python Home Work – Online Coffee Shop

My friend is taking a Python course.  I’ve been doing the assignments for practice/fun while helping each other study.  The course has restrictions as to the data/code structures, but please post alternatives!  Thank you  and enjoy!

Assignment:

 

Assignment

“Create a program that determines the cost of sending out coffee.

The Konditorei coffee shop sells coffee at $10.50 a pound for their Jonestown Brew, and $16.95 for their Plymouth Jolt.  When the user places an order they will choose one of the two types of coffee, they will enter the number of pounds they are ordering. They will enter in their State. They will pick the Delivery method: Overnight, 2-Day or Standard. They will enter in their payment option: PayPal, Credit Card, Check.

You will display the Coffee type and number of pounds they have ordered, the Sub-Total (price * quantity), the Shipping & Handling Costs, Delivery Costs, the City and State it is being shipped to, the Delivery Method, the Payment type, The Tax and the Total. Format in US currency where appropriate.

The Tax Rate is 9% for Washington, California and Texas, 0% for Oregon or Florida, all other are 7%. The Tax Rate is applied to the Sub-Total. The delivery methods are Overnight ($20.00), 2-Day ($13.00), Standard ($0.00). For Payment options, Paypal has a 3% fee (of the Sub-Total), Credit Cards has a 5% fee (of the Sub-Total), and Checks have a 2% discount (of the Sub-Total),

You are required to use functions. One function to determine the Shipping & Handling costs, another function to determine the Tax and another to determine the Sub-Total.

Use a Try Except block to catch the program from blowing up.”

 

Click here to see my assignment.

Written by mattb in: Scripts | Tags: ,




No Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment