Computers and Technology, 11.06.2021 19:10 jamaicandre7
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
Answers: 3
Computers and Technology, 22.06.2019 22:00
Perform the following tasks: a. create a class named testclass that holds a single private integer field and a public constructor. the only statement in the constructor is one that displays the message “constructing”. write a main()function that instantiates one object of the testclass. save the file as testclass.cpp in the chapter 08 folder. run the program and observe the results. b. write another main()function that instantiates an array of 10 testclass objects. save the file as test class array.c . run this program and observe the results.
Answers: 1
Computers and Technology, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
Computers and Technology, 24.06.2019 15:30
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
Computers and Technology, 24.06.2019 20:00
Write c++programs for the following problem: let the user enter two numbers and display which is greater. !
Answers: 1
Prompt: You work for an electronic manufacturer, and have been asked to calculate the total profit m...
Mathematics, 22.09.2020 01:01
English, 22.09.2020 01:01
History, 22.09.2020 01:01
Mathematics, 22.09.2020 01:01