A binary file “Book.dat” has structure [BookNo, Book_Name, Author, Price]
a) Write a user defined function CreateFile() to input data for a record and add to Book.dat file.
b) Write a function CountRec(Author) in Python which accepts the Author name as parameter and count and return number of books written by the given Author are stored in the binary file “Book.dat”
#education #computerscience #tutorial #computers #python #pythonprogramming #pythontutorial #pythonforbeginners #pythonbeginner