Python Python Collections (2016, retired 2019) Dictionaries String Formatting with Dictionaries

I keep getting a bummer, saying output from my function must be a string. I'm stuck

i need help
def favorite_food(name='Kenneth', food = 'tacos'):
    if  name and food:
        result = print(""" "Hi, I'm {name} and I love to eat {food}!" """.format(name= 'Kenneth',food= 'tacos'))

favorite_food(**{'name':' Kenneth', 'food' :'tacos'}) 

1 Answer

Steven Parker
Steven Parker
172,267 Points

The instructions said "the favorite_food function ... accepts a dictionary as an argument.", and the supplied code did accept one named "dict". But what's shown here has been modified to take 2 string arguments instead.

Don't change the the function's calling signature!

Extra hint: you only need to fill in the argument(s) for the "format" call.