10/18 It's Not All Animals and Fruits


#1

What's wrong with my code?

class ShoppingCart(object):
"""Creates shopping cart objects
for users of our fine website."""
items_in_cart = {}
def init(self, customer_name):
self.customer_name = customer_name

def add_item(self, product, price):
    """Add product to the cart."""
    if not product in self.items_in_cart:
        self.items_in_cart[product] = price
        print product + " added."
    else:
        print product + " is already in the cart."

def remove_item(self, product):
    """Remove product from the cart."""
    if product in self.items_in_cart:
        del self.items_in_cart[product]
        print product + " removed."
    else:
        print product + " is not in the cart."

def my_cart(self, product):
        my_cart = ShoppingCart("Eric")
        my_cart.add_item("Penis")

#2

not sure if you figured it out but keep everything with no indentation. remove the def statement. Add a value after "penis" like ("Penis", 10)


#3

This:
def my_cart(self, product):
my_cart = ShoppingCart("Eric")
my_cart.add_item("Penis")

Should be this:
my_cart = ShoppingCart("Eric")
my_cart.add_item("Penis")


#4

lol
I look for help on this problem and run into this