Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this homework you will be practicing the art of work flow through the use of try, except, if , elif,else. Thus, complete the following

In this homework you will be practicing the art of work flow through the use of try, except, if,elif,else. Thus, complete the following problems, emphasizing the work flow necessary to assure that the task is completed and all possible outcomes are accounted for.
Problem 1: We are a small business and want to create a calculator for a product which we carry. The uniqe situation associated with this product is that the cost varies depending on the quatity purchased. However, there is a setup cost associated with making this product which is $250. This means that we will not make any money for orders less than or equal to 10 units.
The product is a highly specialized item we fabricate in house. The Cost of Good Sold COGS is roughly $25 for making the product, packaging, and so forth. We need to develop a simple what if model that will allows to properly price the order for customers. The following table contains the information regarding our current pricing policy. If the order is for 12 units than this falls in the 40% price markup range thus, the customer will be priced at at 45% markup above cost, thus it is for example 12251.45=435. The shipping column contains the percent total it costs to ship the order, for example if the order is 12 then the cost of shipping is an additional 30% on top of the cost, that is the shipping cost is,435*0.3=130.5. We do not acept order if the order is less than 10, thus if a user enters an order quantity of 10 then an error should be given. The error message should be: "ERROR: We do not accept orders less than 10 units for this product. Enter a number greater than or equal to 10 and try again". Bonus 5 pts, make the error text bold and red. The output should consist of the following information: price: 25*order quatity*markup, shipping cost: Cost of shipping order, subtotal: shipping plus price,sales taxes: La Plata county sales tax is 4.9%, which is applied to the subtotal. Finally, present the total cost. All numbers presented should rounded to 2 decimals as it is money.
INPUT: Order quantity: 12 OUPUT:
Price: 435.00
Shipping: 130.50
Subtotal: 565.50
Sales Taxes:27.70
Total: 593.21 in python
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

ISBN: 3319234609, 978-3319234601

More Books

Students also viewed these Databases questions