Question: class Book(object): A Book Object. def __init__(self, title, author, pub_yr='Unknown'): self.title = title self.author = author self.pub_yr = pub_yr def __repr__(self): return ' ' %
class Book(object): """A Book Object.""" def __init__(self, title, author, pub_yr='Unknown'): self.title = title self.author = author self.pub_yr = pub_yr
def __repr__(self): return '
Question:
Using Python: Instantiate two book objects. The first book object should be The Bell Jar by Sylvia Plath, published in 1963. The second book object should be Anna Karenina by Leo Tolstoy, without a publication year.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
