HELP ME ...............OBJECT ORIENTED PROGRAMMING Create a class called ShoppingCart
could some one tell me whats wrong with my code especially the function remove_item class ShoppingCart(object): def __init__(self,total=0,items = {} ): self.total = total self.items = items def add_item(self,item_name="",quantity =0,price = 0): self.total += price*quantity self.items = {item_name:quantity} def remove_item(self, item_name="", quantity =0, price=0): self.total -= price*quantity if self.items[item_name] <= quantity: del self.items else: self.items[item_name] -= quantity def checkout(self,cash_paid): balance = 0 if cash_paid < self.total: return "Cash Paid Not Enough" else: balance = cash_paid -self.total return balance class Shop(ShoppingCart): def __init__(self,quantity=100): self.quantity = quantity def remove_item(self): self.quantity -= 1