What will be the display output of the following code? class…

What will be the display output of the following code? class Cart (object):          cartNo = 10        def __init__(self, cust_name):  Cart.cartNo += 1                  self.cartNo = Cart.cartNo                    self.cust_name = cust_name                    self.cart = [ ]          def addGroc (self, item):      if item not in (‘broccoli’, ‘rice’, ‘bananas’, ‘milk’):             self.cart.append(item)          def showCart (self):                  for item in self.cart:                      print(item)          def __str__ (self):              return ‘Cart#: ‘ + str(self.cartNo) + ‘\nCustomer: ‘ + self.cust_name  c1 = Cart (‘Maria’)c1.addGroc(‘apples’)c1.addGroc(‘pasta’)c1.addGroc(‘bananas’)c1.addGroc(‘melon’)c1.showCart()c1.addGroc(‘onions’)print(c1)

Create a class called Book that is part of a book store inve…

Create a class called Book that is part of a book store inventory tracking system.  Besides title and author, the class has an attribute ISBN (International Standard Book Number) to identify the book and an inventory number, invNo, that tracks each copy of the book the store has in stock.  The invNo is generated using a sequence number starting at 100 and incremented each time a new object is created.  Show the class’s constructor method that accepts the appropriate attributes as parameters and defines them with the highest protection Python allows.  Also show the code for an “equals” method to accept some object as a parameter and return a Boolean value indicating whether the object parameter equals the ‘self’ (internal) object.  The method will allow the class object comparisons with other objects to use the built-in Python “==” operator.  To get full credit the method must ensure the input parameter object is the correct type.  If the ISBN and invNo are the same the objects are deemed to be equal.  Return True if equal, otherwise return False.