Question: %%%%% Python %%% Object orientated programming %%%%% Python%%%%%% Python interpreter Atom %%%%%%%% Background A company sells widgets and offers incentives for customers who buy larger

%%%%% Python %%% Object orientated programming %%%%% Python%%%%%% Python interpreter Atom %%%%%%%%

%%%%% Python %%% Object orientated programming %%%%% Python%%%%%% Python interpreter Atom %%%%%%%%

Background A company sells widgets and offers incentives for customers who buy larger quantities. The base price of a widget is $30. Customers who by 50 or more widgets pay $25 per widget. Customers who buy 100 or more widgets get the first 10 widgets free and pay $22 per widget for the remaining widgets. Most customers have to pay Maryland sales tax (which is 6%), but some organizations are tax-exempt Instructions Upload a file containing a function that calculates the total cost of a customer's order. Your function should satisfy the following specifications: the function should take two arguments, in the following order: o the number of widgets a customer has ordered (assume this will be a non-negative integer) o whether or not the customer must pay sales tax (assume this will be a boolean value; True means the customer has to pay tax; False means they do not) the function should calculate the total cost of the customer's order, including tax if applicable, according to the pricing scheme in the Background section o Hint: you can calculate the total cost with tax by multiplying the pre- tax amount by 1.06 the function should return the total cost as a float (an integer is okay in cases where the total cost can be expressed as an integer with no loss of precision)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!