Question: How should the program work? Instructions are provided below Books and their corresponding costs are shown in the image below.Create the lists above BEFORE the

How should the program work? Instructions are provided below
Books and their corresponding costs are shown in the image below.Create the lists above BEFORE the main function, doing this would give all the functions you create access to these lists.Notice that the lists above reference the same number of elements. "authors" list, and was published in 1601, again the first element in the "published" list, and costs $14.52 which is also the first element in the "prices" list.3. Next Create the functions defined in the table shown below
\table[[Function,Description,Input Argument,Return Results],[book_display(),\table[[Displays all the],[information for all],[the books in a],[tabular format]],\table[[Doesn't need to take],[arguments if lists are],[created before the],[main() function]],Doesn't return values],[show_purchase(book_nums),\table[[Displays information],[for the books the],[user wants to buy]],\table[[book_nums is a list],[that references the],[index positions for],[the books the user],[want to purchase]],Doesn't return values],[totals(book_nums),\table[[Gets prices for books],[the user chose to],[buy. It then],[calculates the],[following],[- Total prices],[for all the],[books chosen],[- Tax (total],[price *0.05)],[- Final total],[(total price +],[tax)]],\table[[book_nums is a list],[that references the],[index positions for],[the books the user],[want to purchase]],\table[[Returns three values],[- cost(sum of],[book prices)],[- tax],[- total(sum of],[prices + tax)]]]]
Create a main() function. The first thing the main function will do is call the book_display() function.
Below is a screenshot that shows what the book_display 0 function would display Next , the program is to ask the user if they wish to purchase another book. If they do , the program is to ask the user to enter the number for the next book they want to purchase.
Next the program is to call the totals(book_nums) function then display the resutls.
The image below provides an example of what the output should look like
Enter number of book you want to buy: 2
Would you like to purchase another book? (y for yes) :y
Enter number of book you want to buy: 4
Would you like to purchase another book? (y for yes) :n
PricePython Help
How should the program work? Instructions are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!