Test Index
CBSE Class 12 Computer Science 2023 Paper Set 4
© examsnet.com
Question : 33 of 35
Marks:
+1,
-0
(a) Write one difference between CSV and text files.Write a program in Python that defines and calls the following user defined functions :(i)
COURIER_ADD(): It takes the values from the user and adds the details to a csv file 'courier.csv'. Each record consists of a list with field elements as cid, s_name, Source, destination to store Courier ID, Sender name, Source and destination address respectively.(ii) COURIER_SEARCH() : Takes the destination as the input and displays all the courier records going to that destination.OR(b) Why it is important to close a file before exiting ?Write a program in Python that defines and calls the following user defined functions :(i) Add_Book() : Takes the details of the books and adds them to a csv file ‘Book.csv’. Each record consists of a list with field elements as book_ID, B_name and pub to store book ID, book name and publisher respectively.(ii) Search_Book() : Takes publisher name as input and counts and displays number of books published by them.
Go to Question: