Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShazlyne Vambe
3,942 Pointsnot proceeding to check work
task one is no longer passing
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}".format.join(display_name)
display_menu = " , ".join(sundaes)
2 Answers
behar
10,799 PointsHey Shazlyne! Couple of things, one is that your not using format correctly. A format should look like this:
#Correct code
menu = "Our available flavors are: {}".format(WhatYouWantToFormat)
#Your code
menu = "Our available flavors are: {}".format.join(display_name)
The second things is that your trying to format and join the sundaes, at the same time. This is good but your not using the join method correctly either. It should look like this:
#Correct code:
"WhatYouWantToJoinItWith".join(WhatYourTryingToJoin)
#Your code:
format.join(display_name) #This is invalid because you cant join the variable display_menu with a format
With this in mind your solution should look something like this:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(", ".join(sundaes))#Here were formatting, the result we get when we join the sundaes with the ", "
#Also seeing as we have accomplished the task in the menu variable we can leave out the display_menu variable
Hope this helps!
Shazlyne Vambe
3,942 Pointsthanks a lot man, figured it out now.