Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

you defined a book data type. class book: title = \\ author = \\ pages …

Question

you defined a book data type. class book: title = \\ author = \\ pages = 0 which statement creates an instance of your book? mybook.mybook = book() mybook = book() mybook = book mybook = new book()

Explanation:

Brief Explanations

In Python, to create an instance of a class, we use the class - name followed by parentheses and assign it to a variable. The new keyword is not used in Python for object - creation like in some other languages. The correct syntax is to simply call the class as a function.

Answer:

myBook = book()