Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create two separate lists, one called books and one called authors. a. In the books list, add the following book titles: 1. War and Peace

Create two separate lists, one called books and one called authors. a. In the books list, add the following book titles: 1. War and Peace 2. Huckleberry Finn 3. The Return of the Native 4. A Christmas Carol 5. Exodus b. Populate the authors list by using a loop that prompts the user for the last name of the author. The user prompt should contain the title of the book. The author's names are as follows: 1. Tolstoy 2. Twain 3. Hardy 4. Dickens 5. Uris 3. Now that you have the two lists set up and populated, create a loop that will print a line for each book and author as shown in the example output. 4. Print a row of asterisks as a separator. 5. Next, create a new list called authorBook in which you put the authors name and book title into a string and assign it to the array. Use the contents from the previously created arrays to do this. Create a line for each author that states their name and the book they wrote such as 'Tolstoy wrote War and Peace'. 6. Using a loop, print out the contents of the authorBook list as shown in the example output. 7. Print a row of asterisks as a separator. 8. Using a list method, drop off the last item of the authorBooks list. 9. Using a loop, print out the contents of the authorBook list as shown in the example output. 10. Print a row of asterisks as a separator. 11. Using a list method, sort the authorBook list in alphabetical order. 12. Using a loop, print out the contents of the authorBook list as shown in the example output. 13. Print a row of asterisks as a separator.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

Students also viewed these Databases questions