Challenge yourself

Beginner
Intermediate
Expert

class Book:
    """Represents a book.

    attributes: title: str, pages: int
    """

    def print_book(self):
        print(f'Title: {self.title}, Pages: {self.pages}')



Write a method, set(title: str, pages: int), that sets object's title and pages attributes.


Create a book and set its attributes.