subject

Prompt: You work for an electronic manufacturer, and have been asked to calculate the total profit made on the sales of a product. You are given a dictionary containing the cost price per unit (in dollars), sell price per unit (in dollars), and the starting inventory. Create a function that takes in a dictionary and returns the total profit made, rounded to the nearest dollar. In your program make sure you include:
Clearly defined function with accurate parameter
Return statement
Output of total profit made rounded to the nearest dollar

Notes:
Assume all inventory has been sold.
Profit = Total sales - Total cost
Might need to use a method, try some of these
You might need to loop through both the key and the values
for key, value in dictionary_name. items():
https://www. w3schools. com/python/python_ref_dictionary. asp

Starting code:

def profit():
return 0

headphones ={"cost_price": 20.54, "sell_price": 45.00, "inventory": 100}
chargers ={"cost_price": 6.78, "sell_price": 12.00, "inventory": 1200}
usb_cable = {"cost_price": 2.58, "sell_price": 10.00, "inventory": 500}

pls dont scam me

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Our primary purpouse as electricians is to do wich of the following core concepts? a: install electrical components in a way they can be upgraded b: install electrical equiptment in a way that reduces heat c: install electrical systems in a safe manner d: only b and c
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
Match the function to its purpose. fast worth 50pts.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
You know the right answer?
Prompt: You work for an electronic manufacturer, and have been asked to calculate the total profit m...
Questions
question
Biology, 14.07.2019 04:22
question
Geography, 14.07.2019 04:22
Questions on the website: 13722367