A product cost is discounted based on the age of the customers. For example, if a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A product cost is discounted based on the age of the customers. For example, if a customer's age is 60 years the customer gets a discount worth 16% of the product price. The following table shows the percentage X used to calculate the discount awarded for different customer's ages: Customer age less than 18 years Between 18 (included) and 40 (not included) years old Discount Percentage No discount 5% Between 40 and 60 years old 13% Between 60 and 80 years old 16% 80 or more years old 20% Use the function design recipe to develop a function named discount. The function has two parameters, the first parameter is the customer age and the second parameter is the product price. The function returns the value of the discount in dollars. Hint: you need to code the conditions that determine the discount percentage. If you think carefully about the order in which the conditions will be executed, you'll see that you don't need to use the Boolean operators ("and", "or","not") in the conditions. A product cost is discounted based on the age of the customers. For example, if a customer's age is 60 years the customer gets a discount worth 16% of the product price. The following table shows the percentage X used to calculate the discount awarded for different customer's ages: Customer age less than 18 years Between 18 (included) and 40 (not included) years old Discount Percentage No discount 5% Between 40 and 60 years old 13% Between 60 and 80 years old 16% 80 or more years old 20% Use the function design recipe to develop a function named discount. The function has two parameters, the first parameter is the customer age and the second parameter is the product price. The function returns the value of the discount in dollars. Hint: you need to code the conditions that determine the discount percentage. If you think carefully about the order in which the conditions will be executed, you'll see that you don't need to use the Boolean operators ("and", "or","not") in the conditions.
Expert Answer:
Answer rating: 100% (QA)
Below is an example of a function named discount that takes the customers age and the product price ... View the full answer
Related Book For
Posted Date:
Students also viewed these finance questions
-
1. Refer to Table 9-1. (LG 9-4) a. What was the spot exchange rate of Canadian dollars for U.S. dollars (USD/CAD) on July 15, 2016? b. What was the six-month forward exchange rate of Cana- dian...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
Explain the investigation process As an HR manager, identify the first three steps you recommend the HR team take to begin to investigate this scenario. Explain how the steps you are recommending are...
-
Working in small teams, brainstorm ideas for an advertising campaign that has as its primary target audience the community of consumers who are intensely loyal to Vans, the surf and skateboard brand...
-
Employees fiercely resist change in organisations due to the way it is managed from the outset. In your own words/style or in tabular form, detail the three phases in which change should be...
-
The following information is taken from the annual report of The Lincoln Electric Company. Calculate the ratio of the allowance for uncollectible accounts divided by gross accounts receivable for...
-
Available-for-Sale Securities Entries and Reporting Player Corporation purchases equity securities costing $73,000 and classifies them as available-for-sale securities. At December 31, the fair value...
-
The notice of deposition does not include a. a list of damages to be calculated. b. the method of recording the testimony. c. a list of documents to be brought to the deposition. d. business topics...
-
You are now going to do a simple breakeven point for number of passengers on a flight for the years 20x4 to 20x6. Go to the worksheet that says Template for DB 3.2. Complete the breakeven analysis...
-
A company had demand for 500 bicycles in January, and forecasted a demand in February for 500 bicycles. The next forecast was for March's demand of 800 bicycles and April's demand of 1000 demand was...
-
Audit reports from other divisions of the enterprise should be kept in the permanent file because: a. Unique deficiencies unearthed in one division may hint of new audit techniques. b. It is a matter...
-
Using the following data, calculate the countrys nominal and real GDP levels: Case Ps (5) SP+ ($) T a 5 40 2 15 b 10 40 4 15 C 4 50 d 4 50 00 00 8 14 8 16
-
Permanent files for audits of operations differ from those used in financial examination because: a. Operations are more complicated. b. Operations tend to vary more from year to year. c. Prior...
-
A schedule board showing all auditors and assignments is useful because: a. It shows the names of the auditors. b. It is difficult to keep all the auditors and their current and future assignments in...
-
Describe the potential legal implications of the failure of an internal auditing department in a multinational corporation to undergo external reviews.
-
Q7 Resolve cos(2x) + 2 sin(x) > 0
-
Modify the CYK algorithm so that it applies to any CFG, not just those in CNF.
-
_________ requires society to use its resources to the fullest extentgetting the _________ we can out of our scarce resources.
-
To generate economic growth, a society must produce _________ consumer goods and _________ capital goods in the present.
-
Advancements in _________, improvements in _________, or new _________ could all lead to outward shifts of the production possibilities curve.
Study smarter with the SolutionInn App