def input(self): print("========================================") print("| Add Book |") print("========================================") title = input("Title : ") author = input("Author : ") price = input("Price : ") copies = input("Copies : ") price = float(price) if price.isnumeric() else 0 copies = int(price) if copies.isnumeric() else 0 return Book(title, Author(author), price, copies)
def __init__(self, title="", author=Author(), price=0, copies=0): Publication.__init__(self, title, price, copies) self.title = title self.copies = copies self.price = price self.__author = author
def __init__(self, title="", author=Author(), price=0, copies=0): self.publik = Publication(title, price, copies) self.__author = author