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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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