Function creates and returns 1d list of final prices

Assignment Help Basic Computer Science
Reference no: EM13766775

Discount store sells items on discounted prices.

Assume that all numbers are INTEGERS.

The inventory is stored in the 2D list named inventory in the following way:

Number of rows = number of items in the store

Number of columns = 4

First column - prices of all items

Second column - discount percent of Category I items

Third column - discount percent of Category II items

Forth column - dicount percent of Categoy III items

Pay attention, the numbers in 2, 3, and 4 columns are the same for all items

The discount rule is:

a. Category I: price of the item less than 5 dollars

b. Category II: price is between 5 and 9

c. Category III: items that cost 10 dollars or more

Write a functon def final_price_list(inventory, row, col) that has 3 parameters - 2D list described above, number of rows and number of columns. Function creates and returns 1D list of final prices for all items after discount is applied. Assume that there is NO TAX.

Write main to test your function..

For example, if the inventory 2D list is:

2 10 30 15

5 10 30 15

12 10 30 15

9 10 30 15

The function will return the following list: [1.8, 3.5, 10.2, 6.3]

Reference no: EM13766775

Questions Cloud

Compute the eps-roe-price and growth rate : We want to compute the EPS, ROE, price and growth rate of Bob & Co. It has 1 m shares outstanding and $75m of book value of equity. Bob & Co. expects to sell $20m worth of sales and keeps 10% of its profit. Its profit from operations is $7 million. F..
Global company traded in the capital markets : How do you think that most businesses (such as Dell computers -- starting in a college dorm room to ultimately becoming a global company traded in the capital markets.) are first financed as a start-up company?
Explore vegetable data provided by usda economic resarch : Explore the vegetable data provided by the USDA Economic Research Services regarding per capita use (consumption) and production trends.
Different types of bonds such as treasury-corporate : There are alot of different types of bonds such as treasury, corporate, municipal, and foreign. Do all bonds have a return date?   Legally, The original maturates has a range from 10 to 40 years. What happens after 40 years if the business goes bankr..
Function creates and returns 1d list of final prices : Write a functon def final_price_list(inventory, row, col) that has 3 parameters - 2D list described above, number of rows and number of columns. Function creates and returns 1D list of final prices for all items after discount is applied. Assume t..
Database administrator for a local department store : The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maintained Oracle server.
What type of perspectives did your fellow classmates display : What types of perspectives did your fellow classmates display in the artifacts they selected? How do the artifacts displayed together reveal ways of knowing, thinking, and expressing?
Discuss self-esteem and self-efficacy : Define and discuss self-esteem and self-efficacy, and discuss the impact of each on behavior, especially on learning.
Two-stage dividend discount model : LIST your estimates for Re then select the estimate that YOU believe is the most appropriate for use in the DDM and EXPLAIN your reasoning.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Making the row number absolute

In cell F6, create a formula to calculate the Total with Insurance. Multiply E6 by 1+ the insurance to calculate the result. Enter the insurance rate as a mixed cell reference in the formula, making the row number absolute.

  Diversity of living things i have to do a project in one

i have to do a project in one area of the diversity of living things we i choose the 5 kingdoms i need to include

  Determine the number of distinct labelling of knn do the

1. determine the number of distinct labelling of knn. do the same for kmm and kmnl2. give an example of a graph g with

  Htmlsupports tags create form analyze information true false

HTML supports tags that allow you to create forms and analyze the information submitted on forms. True False

  Describe virtual private network (vpn) tunneling

Describe some of the PPP configuration options that a network administrator can utilize in this network technology.

  Explain dispatcher and data access object design

Prepare a two page paper comparing and contrasting five of design. Dispatcher - controls client access and re-directs or dispatches client requests to proper party which can be located on same or different tier.

  How digital media has been used to influence

How digital media has been used to influence

  Type of change process

General Electric established its Work-Out process in the early 1990s. It continues to be a mainstay in GE's efforts to initiate change. In the interim years, the Work-Out process has also been adopted by such diverse organizations as General Motor..

  Explain effects of fiscal policies on economy-s production

Explain effects of fiscal policies on economy's production and employment. How do changes in government spending and taxes positively or negatively influence economy's production and employment?

  How can the principles of (a) classical conditioning theory

How can the principles of (a) classical conditioning theory and (b) instrumental conditioning theory be applied to the development of marketing strategies? Please write a page.

  Designing the most secure network possible

Designing the most secure network possible

  How recursion breaks up complex computational problems

Discuss how recursion breaks up complex computational problems into simpler ones. Identify three problems that would be difficult to solve without the use of recursion. Justify your response in simple C++ syntax.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd