Question: Create a file with the name data_format.py Add the following functions to file data_format: 1 function get_book_info(), the function askes the user to enter the

Create a file with the name data_format.py Add the following functions to file data_format: 1 function get_book_info(), the function askes the user to enter the following information: book title book ISBN book author last name book publisher year published book price The function will eliminate leading and trailing spaces from title, ISBN, author name and publisher (use function strip (). The function will return a string from the given information in the same order specified above, separated by forward slash (/) Note: price should be formatted to have two digits after the decimal point Function to_csv_format(), the function takes one parameter which is the string generated by get_book_info(), parse it and return a string of the provided information in a csv format. Function to_JSON_format(), the function takes a CSV formatted string and returns the corresponding JSON format string. Use String Methods find(),string slicing and string concatenation to implement the required functionality. Create a main method as shown in the in-class lab section. Add function calls to get the book information, produce and display the csv format and the json format of the given information as shown. . enter book title: the LOST SYMBOL enter book ISBN: 1488876144 enter author last name: Rollin enter year published: 2889 enter price: The CSV Format String: The Lost Symbol, 1480076144, Brown, 2889,12.87 The JSON Format String: {"title":"The Lost Symbol","isbn":"1480076144", "author_last_name":"Brown", "Year-published" : "2889","price":"12.87"} 12.8652 Process finished with exit code B 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
