Where does `create_product` come from?

def create_products(**products_dict):
for name, price in products_dict.items():
create_product(name, price)

Checkpoint 3

Update the call to create_products() to pass in this dictionary as a series of keyword

create_products(
Baseball=‘3’,
Shirt=‘14’,
Guitar=‘70’)
The output says “Baseball created, being sold for $3”
“Shirt created Being sold for $14”
“Guitar created. Being sold for $70”
My question is: is the formatting of the output due to the importing of the create_product? This is somewhat confusing

The create_product function is available in products.py, and looks like this:

def create_product(name, price):
  print("{} created, being sold for ${}".format(name, price))

Certain lessons have more then one files, just look for the folder/directory icon, this will open a file manager allowing you to open the other files of the project/lesson.

4 Likes

Ok, thank you! I didn’t know that

1 Like

Wow I didn’t know that either, and especially helpful for this lesson. Thanks!