0

How I can I do a categorization program?

I need to create a special categorization program that will assign a special code to each book depending on its title: The code is the first letter of the book title and the number of characters in the title. For example, the code for the book "Harry Potter" would look like this: H12, since the title consists of 12 characters (including spaces) We are given a books.txt file, the titles of books are indicated on separate lines. We need to read the headings one by one and write out the code of each book on separate lines. For example, if a books.txt file contains headers like this: Some kind of book Another book Your program should return the result: S17 A12 https://code.sololearn.com/ctgFJEeX9M08/?ref=app

12th Dec 2020, 8:20 PM
Azizkxon Murotkhonov
Azizkxon Murotkhonov - avatar
0 Réponse