Question

Need this by tonight please and thank you very much in advance Programming You have been...

Need this by tonight please and thank you very much in advance

Programming

You have been hired by a bookstore to provide them a system that can maintain the costs of up to 3 different

book titles; it’s a small bookstore. The owners would like to be able to do the following:

1. Enter the names of 3 books.

2. Enter the cost of each book being maintained.

3. Enter the quantity of each book

4. Calculate the total value of each book title

5. Provide the total costs of inventory (total of all the books in inventory – see formula)

6. Provide the average cost of inventory of all books

Total Value of each book = Cost * Quantity

Total Inventory = (Sum of (Cost * Quantity) of each book)

(i.e. multiply the cost of each book by the quantity entered and add all these to obtain the total cost of inventory)

Average Cost of Inventory = Total Inventory \ Total Quantity of Books

Assume the following: 3 names and costs were entered

The input/output for each of the respective requirements should be similar to (assumes all 3 books were entered):

The list of inventory is:

Book Title Cost Quantity Inventory Value

1. Fury $ 24.12 2 $ 48.24

2. Little Women  $ 5.00 3 $ 15.00

3. War and Peace $ 27.00 1 $ 27.00

The total cost of inventory is: $ 90.24

The average cost of inventory: $ 30.08.

Provide the project for this program in the Project Dropbox, name it as the final (Jeff) with your name.

Grading Scheme

1. Run/No errors

2. Input/Form    Best Practices

3. Calculate Book Value Meaningful Names 3

4. Total Inventory Modular Design 5

5. Average Cost of Inventory

6. Output

7. Looping\Arrays

======================

22

Total Final 20 + 10 = 30 po

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If any problem in understanding please comment below.

I have completed the given task using python language because required programming language is not specified.

Code:

bookname=list()
cost=list()
quantity=list()
inventory=list()
for i in range (0,3,1):
bookname.append(input("Enter book name: "))
cost.append((float)(input("Enter cost of book : $")))
quantity.append((int)(input("Enter qunatity of book : ")))
x=cost[i]*quantity[i]
inventory.append(x)
print ("----------------------")
total=sum(inventory)
avg=total/(len(bookname))
print ("Total inventory is :",total, "Average :",avg)

output:

while finding average in the given example they counted the number of books .so length of bookname used

If average has to be find as sum/total quantity then change the line avg=total/len(bookname) to avg=total/sum(quantity))

then output will be like this

Add a comment
Know the answer?
Add Answer to:
Need this by tonight please and thank you very much in advance Programming You have been...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JAVA Objective : • Learning how to write a simple class. • Learning how to use...

    JAVA Objective : • Learning how to write a simple class. • Learning how to use a prewritten class. • Understanding how object oriented design can aid program design by making it easier to incorporate independently designed pieces of code together into a single application. Instructions: • Create a project called Lab13 that contains three Java file called Book.java , Bookstore.java and TempleBookstore.java • I’ve provided a screenshot of how your project should look like. • Be sure to document...

  • I need this python program to access an excel file, books inventory file. The file called...

    I need this python program to access an excel file, books inventory file. The file called (bkstr_inv.xlsx), and I need to add another option [search books], option to allow a customer to search the books inventory, please. CODE ''' Shows the menu with options and gets the user selection. ''' def GetOptionFromUser(): print("******************BookStore**************************") print("1. Add Books") print("2. View Books") print("3. Add To Cart") print("4. View Receipt") print("5. Buy Books") print("6. Clear Cart") print("7. Exit") print("*****************************************************") option = int(input("Select your option:...

  • I need help building this code.

    You are asked to create the beginnings of a point of sale system for a bookstore in an .aspx webpage. The manager needs to know how much to charge for a transaction derived from the bookstore's three product categories: magazines, paperback books, and educational toys. Using one .aspx page. This project gives you practice with input validation, using local variables, and reporting your output.Include input validation as needed.If each magazine costs $6, each book costs $20, and each toy costs...

  • 5. Wise Books has the following transactions in August related to merchandise inventory (Click the icon...

    5. Wise Books has the following transactions in August related to merchandise inventory (Click the icon to view the transactions.) Read the requirements a. Determine the cost of goods sold and ending merchandise inventory by preparing a perpetual inventory record using the specific identification method. Assume the following costing information for the books sold during the month: August 3: 2 books costing $12 each August 15: 5 books costing $12 each and 7 books costing $20 each August 28: 2...

  • Carla Vista Warehouse distributes hardback books to retail stores and extends credit terms of 2/10, n/30...

    Carla Vista Warehouse distributes hardback books to retail stores and extends credit terms of 2/10, n/30 to all of its customers. During the month of June, the following merchandising transactions occurred. June 1 Purchased books on account for $1,755 (including freight) from Catlin Publishers, terms 2/10, n/30. 3 Sold books on account to Garfunkel Bookstore for $1,200. The cost of the merchandise sold was $850. 6 Received $55 credit for books returned to Catlin Publishers. 9 Paid Catlin Publishers in...

  • Please help me in both questions, thank you very much :) QUESTION 1 Alice owns a...

    Please help me in both questions, thank you very much :) QUESTION 1 Alice owns a cafe in the Brisbane CBD. Due to the large number of cafes in area, the market is highly competitive. 1. If Alice experiences economic losses, she would definitely leave the market immediately 2. Alice is a price taker. 3. If the market price is above the minimum ATC for the profit maximising quantity Alice produces, Alice is making an economic profit. Which of the...

  • Need help with this programming please this is the instruction my teacher provided Write a C++...

    Need help with this programming please this is the instruction my teacher provided Write a C++ class called "Sales" and a main( ) function that uses the class. Also, write documentation of your project. Below is a specification of the class. . INTRODUCTION A company has four salespeople (1 to 4) who sell five different products ( to 5)1. Once a day each salesperson passes in a slip for each different type of product sold. Each slip contains: The salesperson...

  • You need to program a simple book library system. There are three java classes Book.java   //...

    You need to program a simple book library system. There are three java classes Book.java   // book object class Library.java   //library class A2.java //for testing The Book.java class represents book objects which contain the following fields title: a string which represents the book title. author: a string to hold the book author name year: book publication year isbn: a string of 10 numeric numbers. The book class will have also 3 constructors. -The default no argument constructor - A constructor...

  • Please write the code in assembly language which can run in HLA. Thank you very much!!...

    Please write the code in assembly language which can run in HLA. Thank you very much!! -So we need to write the code in assembly language in Notepad++, end with .hla and run it in CMD. - This project is about writing a program to read numbers, counts the items read, calculates the total, the maximum and minimum of the numbers. -The program stops when a 0 is entered. Zero will not be part of the data. -work with integers,...

  • Please help! I have been stuck on this problem for so long!! Thank you! 2. Kaeo...

    Please help! I have been stuck on this problem for so long!! Thank you! 2. Kaeo Koal Company, Inc. purchased a new mining machine at a total cost of $1,800,000 on the first day of its fiscal year. The firm estimates that the machine has a useful life of six years or 8,000,000 tons of coal and a residual value of $120,000 at the end of its useful life. The following schedule indicates the actual number of tons of coal...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT