we have to write code for this function { sort_books_title } Use the function design recipe to develop a function named sort_books_title. The function takes a dictionary as an input parameter. This dictionary contains books stored. First, the function creates a list with the book data. Each list element is a dictionary where all book data is stored. Note that the same book can be in different categories, so you will have a list on the “category” key of the dictionary (see example above). Then, the function uses a bubble sorting algorithm to sort the books by their titles based on alphabetical order. The function returns a list with the book data stored as a dictionary book where the books are sorted alphabetically by title. The function will NOT have any print statements.
we have to write code for this function { sort_books_title }
Use the function design recipe to develop a function named sort_books_title.
The function takes a dictionary as an input parameter. This dictionary contains books stored.
First, the function creates a list with the book data. Each list element is a dictionary where all book
data is stored. Note that the same book can be in different categories, so you will have a list on the
“category” key of the dictionary (see example above). Then, the function uses a bubble sorting
The function returns a list with the book data stored as a dictionary book where the books are
sorted alphabetically by title. The function will NOT have any print statements.
Step by step
Solved in 3 steps with 2 images