QUESTION IMAGE
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()
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.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
myBook = book()